Functions
Function | Description |
---|---|
beforeOperation(eventType, optsOrHandler, handler) | |
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 | The UserRecord passed to auth blocking functions from the identity platform. |
BlockingOptions | All function options plus idToken, accessToken, and refreshToken. |
identity.beforeOperation()
Signature:
export declare function beforeOperation(eventType: AuthBlockingEventType, optsOrHandler: BlockingOptions | ((event: AuthBlockingEvent) => BeforeCreateResponse | BeforeSignInResponse | void | Promise<BeforeCreateResponse> | Promise<BeforeSignInResponse> | Promise<void>), handler: (event: AuthBlockingEvent) => BeforeCreateResponse | BeforeSignInResponse | void | Promise<BeforeCreateResponse> | Promise<BeforeSignInResponse> | Promise<void>): BlockingFunction;
Parameters
Parameter | Type | Description |
---|---|---|
eventType | AuthBlockingEventType | |
optsOrHandler | BlockingOptions | ((event: AuthBlockingEvent) => BeforeCreateResponse | BeforeSignInResponse | void | Promise<BeforeCreateResponse> | Promise<BeforeSignInResponse> | Promise<void>) | |
handler | (event: AuthBlockingEvent) => BeforeCreateResponse | BeforeSignInResponse | void | Promise<BeforeCreateResponse> | Promise<BeforeSignInResponse> | Promise<void> |
Returns:
BlockingFunction
identity.beforeUserCreated()
Handles an event that is triggered before a user is created.
Signature:
export declare function beforeUserCreated(handler: (event: AuthBlockingEvent) => BeforeCreateResponse | Promise<BeforeCreateResponse> | void | Promise<void>): BlockingFunction;
Parameters
Parameter | Type | Description |
---|---|---|
handler | (event: AuthBlockingEvent) => BeforeCreateResponse | Promise<BeforeCreateResponse> | void | Promise<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:
export declare function beforeUserCreated(opts: BlockingOptions, handler: (event: AuthBlockingEvent) => BeforeCreateResponse | Promise<BeforeCreateResponse> | void | Promise<void>): BlockingFunction;
Parameters
Parameter | Type | Description |
---|---|---|
opts | BlockingOptions | Object containing function options |
handler | (event: AuthBlockingEvent) => BeforeCreateResponse | Promise<BeforeCreateResponse> | void | Promise<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:
export declare function beforeUserSignedIn(handler: (event: AuthBlockingEvent) => BeforeSignInResponse | Promise<BeforeSignInResponse> | void | Promise<void>): BlockingFunction;
Parameters
Parameter | Type | Description |
---|---|---|
handler | (event: AuthBlockingEvent) => BeforeSignInResponse | Promise<BeforeSignInResponse> | void | Promise<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:
export declare function beforeUserSignedIn(opts: BlockingOptions, handler: (event: AuthBlockingEvent) => BeforeSignInResponse | Promise<BeforeSignInResponse> | void | Promise<void>): BlockingFunction;
Parameters
Parameter | Type | Description |
---|---|---|
opts | BlockingOptions | Object containing function options |
handler | (event: AuthBlockingEvent) => BeforeSignInResponse | Promise<BeforeSignInResponse> | void | Promise<void> | Event handler which is run every time before a user is signed in |
Returns:
BlockingFunction
identity.getOpts()
Signature:
export declare function getOpts(blockingOptions: BlockingOptions): InternalOptions;
Parameters
Parameter | Type | Description |
---|---|---|
blockingOptions | BlockingOptions |
Returns:
InternalOptions