Workflows ReferenceType Definitions
ReadonlyIdentityWorkflowUtils
type ReadonlyIdentityWorkflowUtils = { [P in keyof WriteIdentityWorkflowUtils]?: never } & ReadIdentityLinksWorkflowUtils & {
readCustomData: <T>(identifier, key, options?) => Promise<T | null>;
resolveJwt: (jwtToken) => Promise<JwtVerification>;
};Type Declaration
readCustomData()
readCustomData: <T>(identifier, key, options?) => Promise<T | null>;Read an item of previously-stored custom data against a user or session.
Data will be read for the current brand only. If the data was written with the 'crossBrand' option, that must be passed here too to read that value.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type | Description |
|---|---|---|
identifier | WorkflowUserIdentifier | The user or session to read the data against. |
key | string | The key to read. Must be a non-empty string of less than 1000 characters. |
options? | CustomDataOptions | Optional settings for the operation. |
Returns
Promise<T | null>
Example
const userProfile: { name: string } | null = await utils.identity.readCustomData(identity, 'user-profile')
resolveJwt()
resolveJwt: (jwtToken) => Promise<JwtVerification>;Resolve an identifier from a JWT using your configured JWT integrations. This is typically used with subsequent calls to other identity functions.
Parameters
| Parameter | Type |
|---|---|
jwtToken | string |
Returns
Promise<JwtVerification>