prepareSso
Ce contenu n’est pas encore disponible dans votre langue.
prepareSso(
client,args):Promise<PrepareSsoReturnType>
Defined in: actions/prepareSso.ts:38
Generate SSO URL without opening popup
This is a synchronous, client-side function that generates the SSO URL without any RPC calls to the wallet iframe. Use this when you need:
- Custom URL modifications before opening popup
- Pre-generation for advanced popup strategies
- URL inspection/logging before SSO flow
Parameters
Section titled “Parameters”client
Section titled “client”The current Frak Client
The SSO parameters
Returns
Section titled “Returns”Promise<PrepareSsoReturnType>
Object containing the generated ssoUrl
Example
Section titled “Example”// Generate URL for inspectionconst { ssoUrl } = prepareSso(client, { metadata: { logoUrl: "..." }, directExit: true});console.log("Opening SSO:", ssoUrl);
// Add custom paramsconst customUrl = `${ssoUrl}&tracking=abc123`;await openSso(client, { metadata, ssoPopupUrl: customUrl });Remarks
Section titled “Remarks”For most use cases, just use openSso() which handles URL generation automatically.
Only use prepareSso() when you need explicit control over the URL.