Aller au contenu

prepareSso

Ce contenu n’est pas encore disponible dans votre langue.

prepareSso(client, args): Promise<PrepareSsoReturnType>

Defined in: actions/prepareSso.ts:31

Ask the wallet iframe for an SSO URL without opening the popup, so the caller can inspect or extend it before opening it itself.

FrakClient

The current Frak Client

PrepareSsoParamsType

The SSO parameters

Promise<PrepareSsoReturnType>

Object containing the generated ssoUrl

const { ssoUrl } = await prepareSso(client, {
metadata: { logoUrl: "..." },
directExit: true
});
await openSso(client, {
metadata: { logoUrl: "..." },
ssoPopupUrl: `${ssoUrl}&tracking=abc123`,
});

For most use cases, just use openSso() which handles URL generation automatically. Only use prepareSso() when you need explicit control over the URL.