1818import functools as _functools
1919import datetime as _dt
2020import dataclasses as _dataclasses
21+ from enum import Enum
2122
2223import firebase_functions .options as _options
2324import firebase_functions .private .util as _util
@@ -237,18 +238,21 @@ class Credential:
237238 sign_in_method : str
238239 """The user's sign-in method."""
239240
241+ class EmailType (str , Enum ):
242+ EMAIL_SIGN_IN = "EMAIL_SIGN_IN"
243+ PASSWORD_RESET = "PASSWORD_RESET"
244+
245+ class SmsType (str , Enum ):
246+ SIGN_IN_OR_SIGN_UP = "SIGN_IN_OR_SIGN_UP"
247+ MULTI_FACTOR_SIGN_IN = "MULTI_FACTOR_SIGN_IN"
248+ MULTI_FACTOR_ENROLLMENT = "MULTI_FACTOR_ENROLLMENT"
240249
241250@_dataclasses .dataclass (frozen = True )
242251class AuthBlockingEvent :
243252 """
244253 Defines an auth event for identitytoolkit v2 auth blocking events.
245254 """
246255
247- data : AuthUserRecord
248- """
249- The UserRecord passed to auth blocking functions from the identity platform.
250- """
251-
252256 locale : str | None
253257 """
254258 The application locale. You can set the locale using the client SDK,
@@ -262,6 +266,13 @@ class AuthBlockingEvent:
262266 Example: 'rWsyPtolplG2TBFoOkkgyg'
263267 """
264268
269+ event_type : str
270+ """
271+ The event type. This provides information on the event name, such as
272+ beforeSignIn or beforeCreate, and the associated sign-in method used,
273+ like Google or email/password.
274+ """
275+
265276 ip_address : str
266277 """
267278 The IP address of the device the end user is registering or signing in from.
@@ -280,10 +291,21 @@ class AuthBlockingEvent:
280291 credential : Credential | None
281292 """An object containing information about the user's credential."""
282293
294+ email_type : EmailType | None
295+ """The type of email event."""
296+
297+ sms_type : SmsType | None
298+ """The type of SMS event."""
299+
283300 timestamp : _dt .datetime
284301 """
285302 The time the event was triggered."""
286303
304+ data : AuthUserRecord
305+ """
306+ The UserRecord passed to auth blocking functions from the identity platform.
307+ """
308+
287309
288310RecaptchaActionOptions = _typing .Literal ["ALLOW" , "BLOCK" ]
289311"""
0 commit comments