Skip to content

Instantly share code, notes, and snippets.

@johndpope
Last active December 26, 2023 14:43
Show Gist options
  • Select an option

  • Save johndpope/7c44b3d26e9c021ec3594c7ae948c0f3 to your computer and use it in GitHub Desktop.

Select an option

Save johndpope/7c44b3d26e9c021ec3594c7ae948c0f3 to your computer and use it in GitHub Desktop.

Revisions

  1. johndpope revised this gist Dec 26, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions firebase-entire-db.json
    1 addition, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
  2. johndpope created this gist Dec 26, 2023.
    26 changes: 26 additions & 0 deletions test.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    import pyrebase

    def initialize_app():
    config = {
    "apiKey": "AIzaSyBbZ7ruKPdQ3OxhEAl2RjfJbJyDuWrrkxA",
    "authDomain": "ar-pianist.firebaseapp.com",
    "databaseURL": "https://ar-pianist.firebaseio.com",
    "storageBucket": "ar-pianist.appspot.com",
    "serviceAccount": "path/to/serviceAccountCredentials.json"
    }

    firebase = pyrebase.initialize_app(config)

    # Get a reference to the auth service
    auth = firebase.auth()

    # Authenticate a user
    user = auth.sign_in_with_email_and_password("[email protected]", "yourpassword")

    print("Successfully authenticated!")

    def main():
    initialize_app()

    if __name__ == '__main__':
    main()