Turnkey home page
Search...
⌘K
Ask AI
Demo
Login
Get started
Get started
Search...
Navigation
SDK reference
addPasskey()
Documentation
SDK reference
API reference
Security
Changelogs
Support
Blog
Contact us
SDK reference
Introduction
React
Overview
Getting started
Authentication
Using embedded wallets
Using external wallets
Signing
UI customization
Sub-organization customization
Advanced API requests
Advanced backend authentication
Troubleshooting
Legacy (@turnkey/sdk-react)
SDK reference
addOauthProvider()
addPasskey()
clearAllSessions()
clearSession()
clearUnusedKeyPairs()
completeOauth()
completeOtp()
connectWalletAccount()
createApiKeyPair()
createPasskey()
createWallet()
createWalletAccounts()
deleteSubOrganization()
disconnectWalletAccount()
exportPrivateKey()
exportWallet()
exportWalletAccount()
fetchUser()
fetchWalletAccounts()
fetchWallets()
getActiveSessionKey()
getAllSessions()
getProxyAuthConfig()
getSession()
getWalletProviders()
handleAddEmail()
handleAddOauthProvider()
handleAddPasskey()
handleAddPhoneNumber()
handleAppleOauth()
handleExportPrivateKey()
handleExportWallet()
handleExportWalletAccount()
handleFacebookOauth()
handleGoogleOauth()
handleImportWallet()
handleConnectExternalWallet()
handleLogin()
handleRemoveOauthProvider()
handleRemovePasskey()
handleRemoveUserEmail()
handleRemoveUserPhoneNumber()
handleSignMessage()
handleUpdateUserEmail()
handleUpdateUserName()
handleUpdateUserPhoneNumber()
importPrivateKey()
importWallet()
initOtp()
loginOrSignupWithWallet()
loginWithOauth()
loginWithOtp()
loginWithPasskey()
loginWithWallet()
logout()
refreshSession()
refreshUser()
refreshWallets()
removeOauthProviders()
removePasskeys()
removeUserEmail()
removeUserPhoneNumber()
setActiveSession()
signAndSendTransaction()
signMessage()
signTransaction()
signUpWithOauth()
signUpWithOtp()
signUpWithPasskey()
signUpWithWallet()
storeSession()
switchWalletProviderChain()
updateUserEmail()
updateUserName()
updateUserPhoneNumber()
verifyOtp()
switchWalletAccountChain()
fetchPrivateKeys()
handleDiscordOauth()
handleImportPrivateKey()
handleXOauth()
React Native
Flutter
Swift
TypeScript | Frontend
TypeScript | Server
Golang
Rust
Ruby
CLI
Python
Web3 libraries
Advanced
Migration Path
SDK reference
addPasskey()
Copy page
Copy page
Package:
react-wallet-kit
Overview
Adds a new passkey authenticator for the user.
This function prompts the user to create a new passkey (WebAuthn/FIDO2) and adds it as an authenticator for the user.
Handles both web and React Native environments, automatically selecting the appropriate passkey creation flow.
If a userId is provided, the passkey is added for that specific user; otherwise, it uses the current session’s userId.
The passkey’s name and display name can be customized; if not provided, defaults are generated.
The resulting passkey attestation and challenge are registered with Turnkey as a new authenticator.
Parameters
params
object
Show params details
params.
displayName
string
display name of the passkey (defaults to the value of
name
).
params.
name
string
name of the passkey (defaults to “Turnkey Passkey-
timestamp
”).
params.
stampWith
StamperType
parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
params.
userId
string
user ID to add the passkey for a specific user (defaults to the current session’s userId).
Response
A successful response returns the following fields:
returns
string[]
required
A promise that resolves to an array of authenticator IDs for the newly added passkey(s).
Was this page helpful?
Yes
No
addOauthProvider()
clearAllSessions()
Assistant
Responses are generated using AI and may contain mistakes.