Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get event_type from AuthBlockingEvent #224

Open
axelmukwena opened this issue Jan 24, 2025 · 1 comment
Open

Unable to get event_type from AuthBlockingEvent #224

axelmukwena opened this issue Jan 24, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@axelmukwena
Copy link

Given the Google Documentations here to Getting user and context information, some fields are not available on the AuthBlockingEvent dataclass.

For example I can extract the following:

from firebase_admin import initialize_app
from firebase_functions import https_fn, identity_fn, options

initialize_app()

@identity_fn.before_user_signed_in()
def handle_user(
    event: identity_fn.AuthBlockingEvent,
) -> identity_fn.BeforeSignInResponse | None:
    email = event.data.email
    uid = event.data.uid
    event_id = event.event_id

However, the following does on exist on the even signature.

from firebase_admin import initialize_app
from firebase_functions import https_fn, identity_fn, options

initialize_app()


@identity_fn.before_user_signed_in()
def handle_user(
    event: identity_fn.AuthBlockingEvent,
) -> identity_fn.BeforeSignInResponse | None:
    event_type = event.event_type
    auth_type = event.auth_type
    resource = event.resource
    # etc
@CorieW
Copy link
Contributor

CorieW commented Feb 10, 2025

Hi @axelmukwena,

Thanks for reporting this issue! We’ve received it and are reviewing it. We’ll provide updates as soon as possible.

@CorieW CorieW added the documentation Improvements or additions to documentation label Feb 10, 2025
@cabljac cabljac assigned cabljac and unassigned cabljac Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants