firebase.auth package
A simple python wrapper for Google’s Firebase Authentication REST API
- class firebase.auth.Auth(api_key, credentials, requests, client_secret=None)[source]
Bases:
object
Firebase Authentication Service
- Parameters
- authenticate_login_with_google()[source]
Redirect the user to Google’s OAuth 2.0 server to initiate the authentication and authorization process.
- Returns
Google Sign In URL
- Return type
- create_authentication_uri(provider_id)[source]
Creates an authentication URI for the given social provider.
For more details:
- create_custom_token(uid, additional_claims=None, expiry_minutes=60)[source]
Create a Firebase Auth custom token.
For more details:- Parameters
uid (str) – The unique identifier of the user, must be a string, between 1-36 characters long.
additional_claims (dict or None) – Optional custom claims to include in the Security Rules
auth
/request.auth
variables.expiry_minutes (int) – The time, in minutes since the UNIX epoch, at which the token expires. Default value is 60.
- Returns
Firebase Auth custom token.
- Return type
- create_user_with_email_and_password(email, password)[source]
Create a new user with email and password.
For more details:
- delete_user_account(id_token)[source]
Delete an existing user.
For more details:- Parameters
id_token (str) – The Firebase ID token of the user to delete.
- send_email_verification(id_token)[source]
Send an email verification to verify email ownership.
For more details:
- sign_in_anonymous()[source]
Sign In Anonymously.
For more details:- Returns
Firebase Auth Tokens.
- Return type
- sign_in_with_custom_token(token)[source]
Exchange custom token for an ID and refresh token.
For more details:
- sign_in_with_email_and_password(email, password)[source]
Sign in a user with an email and password.
For more details:
- sign_in_with_oauth_credential(oauth2callback_url)[source]
Sign In With OAuth credential.
For more details:
- update_profile(id_token, display_name=None, photo_url=None, delete_attribute=None)[source]
Update a user’s profile (display name / photo URL).
For more details:- Parameters
- Returns
UserInfo and Firebase Auth Tokens.
- Return type