Skip to content

Instantly share code, notes, and snippets.

@aashish-chaubey
Last active February 15, 2020 09:12
Show Gist options
  • Save aashish-chaubey/636d40b706dafb6ae04aafe21d08b98d to your computer and use it in GitHub Desktop.
Save aashish-chaubey/636d40b706dafb6ae04aafe21d08b98d to your computer and use it in GitHub Desktop.

Revisions

  1. aashish-chaubey revised this gist Feb 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion firebase_create_user.py
    Original file line number Diff line number Diff line change
    @@ -9,4 +9,4 @@
    user = auth.get_user_by_email('[email protected]')

    # Example to register a new user
    user = auth.create_user(email='johndoe@exmaple.com', email_verified=True, phone_number='+15555550101', password='johndoe', display_name='John Doe',disabled=False)
    user = auth.create_user(email='johndoe@example.com', email_verified=True, phone_number='+15555550101', password='johndoe', display_name='John Doe',disabled=False)
  2. aashish-chaubey revised this gist Feb 14, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions firebase_create_user.py
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    import firebase_auth
    from firebase_auth import credentials
    from firebase_auth import auth
    import firebase_admin
    from firebase_admin import credentials
    from firebase_admin import auth

    cred = credentials.Certificate('secreatFile.json')
    default_app = firebase_admin.initialize_app(cred)
  3. aashish-chaubey created this gist Feb 14, 2020.
    12 changes: 12 additions & 0 deletions firebase_create_user.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    import firebase_auth
    from firebase_auth import credentials
    from firebase_auth import auth

    cred = credentials.Certificate('secreatFile.json')
    default_app = firebase_admin.initialize_app(cred)

    # Search a user by email, ig registered
    user = auth.get_user_by_email('[email protected]')

    # Example to register a new user
    user = auth.create_user(email='[email protected]', email_verified=True, phone_number='+15555550101', password='johndoe', display_name='John Doe',disabled=False)