Skip to content

Instantly share code, notes, and snippets.

View ibrahim0814's full-sized avatar

Ibrahim Ali ibrahim0814

View GitHub Profile
@ibrahim0814
ibrahim0814 / firebase_auth.py
Created December 7, 2021 00:00
Firebase API Auth (Python)
from google.oauth2 import service_account
from google.auth.transport.requests import AuthorizedSession
# Define the required scopes
scopes = [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/firebase.database"
]
# Authenticate a credential with the service account