Interface: UpbondConfig
The single configuration object an RP hands to createUpbond.
Validated once at the boundary by validateConfig; everything downstream
trusts the resolved shape.
Remarks
validateConfig throws UpbondError with code config_invalid
when issuer/redirectUri are not absolute http(s) URLs, clientId is
empty, postLoginPath is not absolute, or (when wallet is present) the
resolved wallet fields are inconsistent.
Properties
clientId
clientId:
string
OIDC client_id registered at the issuer.
environment?
optionalenvironment?:UpbondEnvironment
UPBOND deployment to target; fills issuer and the whole wallet leg
(Web3Auth project, verifier, network, wallet origin, recovery wiring).
Defaults to 'production' — the minimal integration is
createUpbond({ clientId }).
issuer?
optionalissuer?:string
Issuer origin override; defaults from environment. Must equal the id_token iss.
persistence?
optionalpersistence?:"session"|"local"
Where the session persists (docs/24 D13). 'session' (default) uses
sessionStorage — the session ends with the tab. 'local' uses
localStorage so a revisit restores the session; paired with an
offline_access scope, an expired session is silently refreshed on
boot (the "open the wallet and you're in" UX). Use 'local' only on the
wallet's own origin, never on an untrusted shared device.
postLoginPath?
optionalpostLoginPath?:string
Path shown (history.replaceState) after the callback is consumed; defaults to '/'. Set it to the page's own path for multi-page apps.
redirectUri?
optionalredirectUri?:string
Redirect URI back into the RP; defaults to window.location.origin.
Either way it must be registered at the issuer for this client.
scope?
optionalscope?:string
Defaults to openid profile email (add wallet to receive wallet_address).
storageKeyPrefix?
optionalstorageKeyPrefix?:string
Storage namespace; defaults to 'upbond'.
wallet?
optionalwallet?:UpbondWalletConfig
Wallet-leg overrides. Omitting it does NOT disable the wallet: the
environment preset supplies the embedded (widget) wallet by default,
and an auth-only RP simply never calls a wallet method. Pass fields here
only to switch to mode: 'redirect' (local MPC on the RP page — the
wallet's own origin / internal demos), wire the recovery OTP UI, or
point at a custom deployment.