Skip to main content
The social signer lets users authenticate with an OAuth provider (Google, Apple, Discord) through web3auth. The OAuth public flow runs in the browser; the provider secret and verifier callback are handled by your backend signer-proxy. A Stellar ed25519 key backs the resulting account - the user never manages a seed phrase.

When to use

Choose socialSigner when you want a familiar sign-in button (Google, Apple, Discord) without requiring your users to install a wallet or remember a seed phrase. The resulting key backs a classic G... account.
The web3auth client secret must never be included in a browser bundle. Configure a same-origin proxyUrl pointing at your backend signer-proxy, which is created with createSignerProxyRoute from @buckspay/nextjs. Only the public OAuth flow runs in the browser; the secret callback and verifier go through your server.

Factory

socialSigner(opts) accepts a SocialSignerOptions object:

Authentication

Call signer.authenticate?.(params) before the payment. It runs the provider’s OAuth flow and resolves an AuthDetails object:
After authenticate() returns, the signer’s getPublicKey() and signAuthEntry() are ready. Provider or network failures surface as BuckspayError with code AUTH_PROVIDER_ERROR.

Server-side proxy

Mount the signer-proxy in your backend (for example, a Next.js App Router route):
The proxy receives the OAuth callback and calls the facilitator’s POST /auth/social endpoint with the secret - only public key material is returned to the browser.

Example

Next

Email OTP

No OAuth required - authenticate with a code sent to the user’s inbox.

Facilitator and BFF

How the signer-proxy and API key work together server-side.