identity namespace Stay organized with collections Save and categorize content based on your preferences.
Functions
| Function | Description |
|---|---|
| beforeEmailSent(handler) | Handles an event that is triggered before an email is sent to a user. |
| beforeEmailSent(opts, handler) | Handles an event that is triggered before an email is sent to a user. |
| beforeOperation(eventType, optsOrHandler, handler) | |
| beforeSmsSent(handler) | Handles an event that is triggered before an SMS is sent to a user. |
| beforeSmsSent(opts, handler) | Handles an event that is triggered before an SMS is sent to a user. |
| beforeUserCreated(handler) | Handles an event that is triggered before a user is created. |
| beforeUserCreated(opts, handler) | Handles an event that is triggered before a user is created. |
| beforeUserSignedIn(handler) | Handles an event that is triggered before a user is signed in. |
| beforeUserSignedIn(opts, handler) | Handles an event that is triggered before a user is signed in. |
| getOpts(blockingOptions) |
Classes
| Class | Description |
|---|---|
| HttpsError | An explicit error that can be thrown from a handler to send an error to the client that called the function. |
Interfaces
| Interface | Description |
|---|---|
| AuthBlockingEvent | Defines the auth event for 2nd gen blocking events |
| AuthUserRecord | TheUserRecord passed to auth blocking functions from the identity platform. |
| BlockingOptions | All function options plus idToken, accessToken, and refreshToken. |
identity.beforeEmailSent()
Handles an event that is triggered before an email is sent to a user.
Signature:
exportdeclarefunctionbeforeEmailSent(handler:(event:AuthBlockingEvent)=>MaybeAsync<BeforeEmailResponse|void>):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| handler | (event:AuthBlockingEvent) => MaybeAsync<BeforeEmailResponse | void> | Event handler that is run before an email is sent to a user. |
Returns:
BlockingFunction
identity.beforeEmailSent()
Handles an event that is triggered before an email is sent to a user.
Signature:
exportdeclarefunctionbeforeEmailSent(opts:Omit<BlockingOptions,"idToken"|"accessToken"|"refreshToken">,handler:(event:AuthBlockingEvent)=>MaybeAsync<BeforeEmailResponse|void>):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| opts | Omit<BlockingOptions, "idToken" | "accessToken" | "refreshToken"> | Object containing function options. |
| handler | (event:AuthBlockingEvent) => MaybeAsync<BeforeEmailResponse | void> | Event handler that is run before an email is sent to a user. |
Returns:
BlockingFunction
identity.beforeOperation()
Signature:
exportdeclarefunctionbeforeOperation(eventType:AuthBlockingEventType,optsOrHandler:BlockingOptions|((event:AuthBlockingEvent)=>MaybeAsync<BeforeCreateResponse|BeforeSignInResponse|BeforeEmailResponse|BeforeSmsResponse|void>),handler:HandlerV2):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| eventType | AuthBlockingEventType | |
| optsOrHandler | BlockingOptions | ((event:AuthBlockingEvent) => MaybeAsync<BeforeCreateResponse | BeforeSignInResponse | BeforeEmailResponse | BeforeSmsResponse | void>) | |
| handler | HandlerV2 |
Returns:
BlockingFunction
identity.beforeSmsSent()
Handles an event that is triggered before an SMS is sent to a user.
Signature:
exportdeclarefunctionbeforeSmsSent(handler:(event:AuthBlockingEvent)=>MaybeAsync<BeforeSmsResponse|void>):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| handler | (event:AuthBlockingEvent) => MaybeAsync<BeforeSmsResponse | void> | Event handler that is run before an SMS is sent to a user. |
Returns:
BlockingFunction
identity.beforeSmsSent()
Handles an event that is triggered before an SMS is sent to a user.
Signature:
exportdeclarefunctionbeforeSmsSent(opts:Omit<BlockingOptions,"idToken"|"accessToken"|"refreshToken">,handler:(event:AuthBlockingEvent)=>MaybeAsync<BeforeSmsResponse|void>):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| opts | Omit<BlockingOptions, "idToken" | "accessToken" | "refreshToken"> | Object containing function options. |
| handler | (event:AuthBlockingEvent) => MaybeAsync<BeforeSmsResponse | void> | Event handler that is run before an SMS is sent to a user. |
Returns:
BlockingFunction
identity.beforeUserCreated()
Handles an event that is triggered before a user is created.
Signature:
exportdeclarefunctionbeforeUserCreated(handler:(event:AuthBlockingEvent)=>MaybeAsync<BeforeCreateResponse|void>):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| handler | (event:AuthBlockingEvent) => MaybeAsync<BeforeCreateResponse | void> | Event handler which is run every time before a user is created. |
Returns:
BlockingFunction
identity.beforeUserCreated()
Handles an event that is triggered before a user is created.
Signature:
exportdeclarefunctionbeforeUserCreated(opts:BlockingOptions,handler:(event:AuthBlockingEvent)=>MaybeAsync<BeforeCreateResponse|void>):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| opts | BlockingOptions | Object containing function options. |
| handler | (event:AuthBlockingEvent) => MaybeAsync<BeforeCreateResponse | void> | Event handler which is run every time before a user is created. |
Returns:
BlockingFunction
identity.beforeUserSignedIn()
Handles an event that is triggered before a user is signed in.
Signature:
exportdeclarefunctionbeforeUserSignedIn(handler:(event:AuthBlockingEvent)=>MaybeAsync<BeforeSignInResponse|void>):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| handler | (event:AuthBlockingEvent) => MaybeAsync<BeforeSignInResponse | void> | Event handler which is run every time before a user is signed in. |
Returns:
BlockingFunction
identity.beforeUserSignedIn()
Handles an event that is triggered before a user is signed in.
Signature:
exportdeclarefunctionbeforeUserSignedIn(opts:BlockingOptions,handler:(event:AuthBlockingEvent)=>MaybeAsync<BeforeSignInResponse|void>):BlockingFunction;Parameters
| Parameter | Type | Description |
|---|---|---|
| opts | BlockingOptions | Object containing function options. |
| handler | (event:AuthBlockingEvent) => MaybeAsync<BeforeSignInResponse | void> | Event handler which is run every time before a user is signed in. |
Returns:
BlockingFunction
identity.getOpts()
Signature:
exportdeclarefunctiongetOpts(blockingOptions:BlockingOptions):InternalOptions;Parameters
| Parameter | Type | Description |
|---|---|---|
| blockingOptions | BlockingOptions |
Returns:
InternalOptions
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-22 UTC.