Cloud functions to handle Eventarc events.
Classes
AdditionalUserInfoclass firebase_functions.identity_fn.AdditionalUserInfo(provider_id: str, profile: dict[str, Any] | None, username: str | None, is_new_user: bool, recaptcha_score: float | None) |
---|
Bases: The additional user info component of the auth event context.
|
AuthBlockingEventclass firebase_functions.identity_fn.AuthBlockingEvent(data: AuthUserRecord, locale: str | None, event_id: str, ip_address: str, user_agent: str, additional_user_info: AdditionalUserInfo, credential: Credential | None, timestamp: datetime) |
---|
Bases: Defines an auth event for identitytoolkit v2 auth blocking events.
|
AuthMultiFactorInfoclass firebase_functions.identity_fn.AuthMultiFactorInfo(uid: str, display_name: str | None, factor_id: str, enrollment_time: datetime | None, phone_number: str | None) |
---|
Bases: Interface representing the common properties of a user-enrolled second factor.
|
AuthMultiFactorSettingsclass firebase_functions.identity_fn.AuthMultiFactorSettings(enrolled_factors: list[AuthMultiFactorInfo]) |
---|
Bases: The multi-factor related properties for the current user, if available.
|
AuthUserInfoclass firebase_functions.identity_fn.AuthUserInfo(uid: str, provider_id: str, display_name: str | None = None, email: str | None = None, photo_url: str | None = None, phone_number: str | None = None) |
---|
Bases: User info that is part of the AuthUserRecord.
|
AuthUserMetadataclass firebase_functions.identity_fn.AuthUserMetadata(creation_time: datetime, last_sign_in_time: datetime | None) |
---|
Bases: Additional metadata about the user.
|
AuthUserRecordclass firebase_functions.identity_fn.AuthUserRecord(uid: str, email: str | None, email_verified: bool | None, display_name: str | None, photo_url: str | None, phone_number: str | None, disabled: bool, metadata: AuthUserMetadata, provider_data: list[AuthUserInfo], password_hash: str | None, password_salt: str | None, custom_claims: dict[str, Any] | None, tenant_id: str | None, tokens_valid_after_time: datetime | None, multi_factor: AuthMultiFactorSettings | None) |
---|
Bases: The UserRecord passed to auth blocking functions from the identity platform.
|
BeforeCreateResponseclass firebase_functions.identity_fn.BeforeCreateResponse |
---|
Bases: The handler response type for 'before_user_created' blocking events.
|
BeforeSignInResponseclass firebase_functions.identity_fn.BeforeSignInResponse |
---|
Bases: The handler response type for 'before_user_signed_in' blocking events.
|
Credentialclass firebase_functions.identity_fn.Credential(claims: dict[str, Any] | None, id_token: str | None, access_token: str | None, refresh_token: str | None, expiration_time: datetime | None, secret: str | None, provider_id: str, sign_in_method: str) |
---|
Bases: The credential component of the auth event context.
|
Functions
before_user_createdfirebase_functions.identity_fn.before_user_created(**kwargs) Callable[[Callable[[AuthBlockingEvent], BeforeCreateResponse | None]], Callable[[AuthBlockingEvent], BeforeCreateResponse | None]] |
---|
Handles an event that is triggered before a user is created. Example: from firebase_functions import identity_fn @identity_fn.before_user_created() def example(event: identity_fn.AuthBlockingEvent) -> identity_fn.BeforeCreateResponse | None: pass
|
before_user_signed_infirebase_functions.identity_fn.before_user_signed_in(**kwargs) Callable[[Callable[[AuthBlockingEvent], BeforeSignInResponse | None]], Callable[[AuthBlockingEvent], BeforeSignInResponse | None]] |
---|
Handles an event that is triggered before a user is signed in. Example: from firebase_functions import identity_fn @identity_fn.before_user_signed_in() def example(event: identity_fn.AuthBlockingEvent) -> identity_fn.BeforeSignInResponse | None: pass
|
Constants
BeforeUserCreatedCallablefirebase_functions.identity_fn.BeforeUserCreatedCallable |
---|
The type of the callable for 'before_user_created' blocking events. alias of |
BeforeUserSignedInCallablefirebase_functions.identity_fn.BeforeUserSignedInCallable |
---|
The type of the callable for 'before_user_signed_in' blocking events. alias of |
RecaptchaActionOptionsfirebase_functions.identity_fn.RecaptchaActionOptions |
---|
The reCAPTCHA action options. alias of |