Skip to content

Documentation / @frak-labs/core-sdk / index / generateSsoUrl

Function: generateSsoUrl()

generateSsoUrl(walletUrl, params, merchantId, name, clientId, css?): string

Defined in: utils/sso.ts:42

Generate SSO URL with compressed parameters This mirrors the wallet's getOpenSsoLink() function

Parameters

walletUrl

string

Base wallet URL (e.g., "https://wallet.frak.id")

params

PrepareSsoParamsType

SSO parameters

merchantId

string

Merchant identifier

name

string | undefined

Application name

clientId

string

Client identifier for identity tracking

css?

string

Optional custom CSS

Returns

string

Complete SSO URL ready to open in popup or redirect

Example

const ssoUrl = generateSsoUrl(
  "https://wallet.frak.id",
  { metadata: { logoUrl: "..." }, directExit: true },
  "0x123...",
  "My App"
);
// Returns: https://wallet.frak.id/sso?p=<compressed_base64>