My configuration of firebase_admin is good to authenticate users?

Viewed 40

I want to verify the token id my code its working, but why is working? i setup good?

i have that doubt because auth variable does not know the credentials to verify the token, the variable who know the credentials is firebase_app, how auth variable is verifying the token?

from firebase_admin import auth
from django.conf import settings

fire_credentials = credentials.Certificate(FIREBASE_CONFIG_credentials)
fire_app = firebase_admin.initialize_app(fire_credentials)


def login():
    token = 'eyJhbGciO...'
    try:
       auth.verify_id_token(token)
1 Answers

Auth comes from firebase_admin:

from firebase_admin import auth

When you initialize firebase_admin:

firebase_app = firebase_admin.initialize_app(firebase_creds)

you are also initializing all of its components.

If your calls are not returning any errors, then everything is OK.

Related