Google, X, Apple, and email
These four calls useclient.authStart. Google, X, and Apple return type: "redirect" and require
redirectUrl (an allowed origin). Email sends a magic link; email is required and redirectUrl
is where the link sends the user back.
Email and wallet starts can return type: "challenge_required". Resubmit the same body with
turnstileToken. Google, X, and Apple do not return that type. Widget setup is
Bot protection.
- Google
- Twitter
- Apple
- Email
redirectUrl with a one-time code. Exchange it on your backend, or in the
browser on that page. The code is single-use.
SIWS
Solana wallet sign-in does not redirect. Ledger uses this same call:signMessage on the raw UTF-8
bytes, not Phantom’s signIn() helper.
React
AggAuthProvider from @agg-build/auth completes challenge_required for the connect button.
See Bot protection and the
Connect Button reference. Wire the client in
Quickstart: React.
createTwitterAuthMethod and createAppleAuthMethod are the same shape as createGoogleAuthMethod.
Dedicated callback pages
On a standalone callback route,useAggAuthCallback() reads the redirect:
useAggAuth is the wallet hook for a custom button.
Token storage
Access and refresh tokens stay in memory. The SDK writes only a non-sensitive hint tolocalStorage (user id, username, avatar, wallet address, and wasAuthenticated), keyed by
appId. Restoring that hint sets authStatus to "unknown", not "authenticated".
persistSession: false skips the hint. Refresh lifetimes are in
Authentication & sessions.
In
"cookie-refresh", those methods may omit refreshToken from the JSON.
React Native
localStorage is missing, so the hint is not stored and isAuthenticated is false after a
restart. The HttpOnly cookie is not available either. Keep "body" mode, store the refresh token
in the platform keystore, and seed it with setSession() before the first authenticated call.
AsyncStorage.
Install
Related
Authentication
Sessions, refresh, and SIWE.
Quickstart: REST
Wallet sign-in with curl.
Bot protection
Turnstile when start returns challenge_required.
Privy
Sign in with a Privy access token.
Account linking
Add a provider to the current user.
Quickstart: React
Client, provider, and connect button setup.