Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt

Use this file to discover all available pages before exploring further.

Embedded wallets support multiple authentication flows. Each method creates or recovers the same underlying wallet address for that user; a user who signs in with Google and then later with email (if accounts are linked) accesses the same wallet.

Social login

Social login is the recommended flow for consumer-facing fintechs and payment apps. Users authenticate via their existing Google or Apple account. No password or seed phrase is involved.
const result = await oms.wallet.signInWithOidcRedirect({
  provider: 'google',
})

if (result && 'walletAddress' in result) {
  console.log('Wallet address:', result.walletAddress)
}
The wallet is created automatically on first login using the identity token from the provider. The token is verified inside a secure enclave; neither the app nor Sequence can read it. For Google setup, see the Google OAuth configuration guide on the Sequence docs. For Apple setup, see the Apple configuration guide.

Email OTP

Email OTP is ideal for financial products where users may not have a social account or prefer not to link one. The user enters their email, receives a one-time code, and the wallet is created on verification.
await oms.wallet.startEmailAuth({ email: 'user@example.com' })

const result = await oms.wallet.completeEmailAuth({ code: '123456' })

console.log('Wallet address:', result.walletAddress)
The SDK handles the full OTP flow. No additional backend is required; the code exchange happens between the SDK and Sequence’s Identity Instrument.

Passkeys

Passkeys are the most secure auth option. They use device-bound biometrics (Face ID, Touch ID, Windows Hello) and are phishing-resistant by design. Passkeys are well-suited for high-value payment products where security is paramount. Passkeys are configured in the Polygon project dashboard per project. Once enabled, users can register a passkey during onboarding or as an additional factor. See Recovery for how passkeys integrate with the wallet recovery model.

Checking sign-in state

if (oms.wallet.session.walletAddress) {
  console.log('Signed in:', oms.wallet.session.walletAddress)
} else {
  console.log('Not signed in')
}