PollarPollar
Operator GuideUser Management

Authentication

Dashboard → User Management → Authentication

Configure which authentication providers are available to your users.


Supported providers

ProviderTypeSetup required
GoogleOAuth 2.0None — Pollar handles the OAuth flow
GitHubOAuth 2.0None — Pollar handles the OAuth flow
DiscordOAuth 2.0None — Pollar handles the OAuth flow
Email OTPOne-time passwordNone — Pollar sends the OTP email

Enable or disable each provider here. Only enabled providers appear in the WalletButton modal and are accepted by login().


Email OTP flow

What the user sees at each state

StateWhat the user sees
idleWalletButton — the login entry point
creating_sessionLoginModal opens with a centered spinner and label "Initializing..."
entering_emailLoginModal shows an email input field and a "Continue" button
sending_email"Continue" button is disabled with an inline spinner — label changes to "Sending..."
entering_codeLoginModal shows a 6-digit OTP input field and a "Verify" button
verifying_email_code"Verify" button is disabled with an inline spinner — label changes to "Verifying..."
authenticatingLoginModal shows a centered spinner and label "Authenticating..."
authenticatedLoginModal shows a success message — closes automatically after a few seconds

OAuth flow (Google, GitHub, Discord)

OAuth providers follow the standard authorization code flow. When login({ provider: 'google' }) is called:

  1. LoginModal opens briefly with a spinner — "Redirecting..."
  2. The browser redirects to the provider's consent screen
  3. After the user approves, the provider redirects back to your app
  4. LoginModal reopens with a spinner — "Authenticating..."
  5. The same five internal steps run (see below)
  6. LoginModal shows a success message and closes

What happens during authentication

After credentials are verified — whether via OTP code or OAuth callback — the Pollar API runs five steps before issuing the JWT:

  1. Validate session — confirms the session ID is valid and not expired
  2. Resolve wallet — finds the existing wallet for this user, or creates a new one on first login
  3. Verify minimum funding — checks the wallet has the minimum XLM reserve (Immediate mode only)
  4. Verify trustlines — ensures all assets configured in the Dashboard are enabled on the wallet
  5. Generate JWT — issues a signed token that the SDK stores and uses for subsequent requests

This sequence is identical for all providers.


Custom OAuth app coming soon

By default, Pollar uses its own OAuth credentials for Google, GitHub, and Discord. You can configure your own OAuth app credentials for a fully branded experience — users will see your app name in the OAuth consent screen instead of Pollar's.

On this page

Was this helpful?