Redirect URLs

Where e-mail links and OAuth sign-ins send users back to: the Site URL and the allowed Redirect URLs.

Links in auth e-mails and OAuth sign-ins first go to https://<project-ref>.p.stitchdb.com/auth/v1/verify or /callback, then to your app. Configure both in Studio → Authentication → URL configuration.

SettingMeaning
Site URLThe default destination, used when no redirectTo is passed or it isn't allowed. Also {{ .SiteURL }} in e-mail templates. Default for new projects: http://localhost:3000.
Redirect URLsUp to 100 more URLs that redirectTo / emailRedirectTo may use. Each needs a scheme and host.

#Wildcards

  • * matches within one host label or path segment, ** matches anything, including slashes.
  • Examples: https://*.example.com/** (every subdomain and path), http://localhost:3000/** (local development), myapp://auth/callback (a mobile deep link).
  • A bare wildcard host such as https://* is not accepted.
JavaScript
await stitchdb.auth.signInWithOAuth({ provider: 'google', options: { redirectTo: 'https://app.example.com/after-login' } })