Overview
Signs up a user using OAuth authentication.
- This function creates a new sub-organization for the user using the provided OIDC token, public key, and provider name.
- Handles the full OAuth sign-up flow, including sub-organization creation and session management.
- Optionally accepts additional sub-organization creation parameters and a custom session key.
- After successful sign-up, automatically logs in the user and returns a signed JWT session token.
Package: core
Defined in: clients/core.ts:1727
Parameters
params
SignUpWithOauthParams
required
params.createSubOrgParams
parameters for sub-organization creation (e.g., authenticators, user metadata).
Show createSubOrgParams details
params.createSubOrgParams.apiKeys
params.createSubOrgParams.authenticators
params.createSubOrgParams.customWallet
custom wallets to create during sub-org creation time
Show customWallet details
params.createSubOrgParams.customWallet.walletAccounts
v1WalletAccountParams[]
requiredlist of wallet accounts to create
params.createSubOrgParams.customWallet.walletName
name of the wallet created
params.createSubOrgParams.oauthProviders
params.createSubOrgParams.subOrgName
name of the sub-organization
params.createSubOrgParams.userEmail
params.createSubOrgParams.userName
params.createSubOrgParams.userPhoneNumber
params.createSubOrgParams.userTag
params.createSubOrgParams.verificationToken
verification token if email or phone number is provided
OIDC token received after successful authentication with the OAuth provider.
name of the OAuth provider (e.g., “Google”, “Apple”).
public key to associate with the new sub-organization.
session key to use for session creation (defaults to the default session key).
Response
A successful response returns the following fields:
A promise that resolves to a BaseAuthResult, which includes:
sessionToken
: the signed JWT session token.