Skip to content

getMergeToken

getMergeToken(client, options?): Promise<string | null>

Defined in: actions/getMergeToken.ts:19

Fetch a merge token for the current anonymous identity.

Used by in-app browser redirect flows to preserve identity when switching from a WebView to the system browser. The token is appended as ?fmt= to the redirect URL.

Results are cached in memory for 30 seconds by default. Concurrent calls while a request is in-flight are deduplicated automatically.

FrakClient

The current Frak Client

Optional cache configuration

number

Time in ms to cache the result. Default: 30_000 (30s). Set to 0 to disable.

Promise<string | null>

The merge token string, or null if unavailable