Turnkey home page
Search...
⌘K
Ask AI
Demo
Login
Get started
Get started
Search...
Navigation
SDK reference
signUpWithOauth()
Documentation
SDK reference
API reference
Security
Changelogs
Support
Blog
Contact us
SDK reference
Introduction
React
React Native
Flutter
Swift
TypeScript | Frontend
Overview
Getting Started
Authentication
Advanced backend authentication
Advanced API requests
Legacy (@turnkey/sdk-browser)
SDK reference
addOauthProvider()
addPasskey()
clearAllSessions()
clearSession()
clearUnusedKeyPairs()
completeOauth()
completeOtp()
connectWalletAccount()
constructor()
createApiKeyPair()
createPasskey()
createWallet()
createWalletAccounts()
deleteSubOrganization()
disconnectWalletAccount()
exportPrivateKey()
exportWallet()
exportWalletAccount()
fetchUser()
fetchWalletAccounts()
fetchWallets()
getActiveSessionKey()
getAllSessions()
getProxyAuthConfig()
getSession()
getWalletProviders()
importPrivateKey()
importWallet()
init()
initOtp()
loginOrSignupWithWallet()
loginWithOauth()
loginWithOtp()
loginWithPasskey()
loginWithWallet()
logout()
refreshSession()
removeOauthProviders()
removePasskeys()
removeUserEmail()
removeUserPhoneNumber()
setActiveSession()
signAndSendTransaction()
signMessage()
signTransaction()
signUpWithOauth()
signUpWithOtp()
signUpWithPasskey()
signUpWithWallet()
storeSession()
switchWalletProviderChain()
updateUserEmail()
updateUserName()
updateUserPhoneNumber()
verifyOtp()
switchWalletAccountChain()
fetchPrivateKeys()
TypeScript | Server
Golang
Rust
Ruby
CLI
Python
Web3 libraries
Advanced
Migration Path
SDK reference
signUpWithOauth()
Copy page
Copy page
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:
core.ts:1703
Parameters
params
object
required
Show params details
params.
createSubOrgParams
CreateSubOrgParams
parameters for sub-organization creation (e.g., authenticators, user metadata).
params.
oidcToken
string
required
OIDC token received after successful authentication with the OAuth provider.
params.
providerName
string
required
name of the OAuth provider (e.g., “Google”, “Apple”).
params.
publicKey
string
required
public key to associate with the new sub-organization.
params.
sessionKey
string
session key to use for session creation (defaults to the default session key).
Response
A successful response returns the following fields:
returns
BaseAuthResult
required
A promise that resolves to a BaseAuthResult, which includes:
sessionToken
: the signed JWT session token.
Was this page helpful?
Yes
No
signTransaction()
signUpWithOtp()
Assistant
Responses are generated using AI and may contain mistakes.