Skip to content

Work / Learning Platform / Wiki / Surfaces

oauth-callback

Surfacecanonicalverified 2026-10-04

SURFACE.WEB.AUTH.OAUTH-CALLBACK

Summary

Where GitHub and Google send the browser back.

Raw wireframe

  • .context/designs/web/auth/callback.html
  • .context/designs/web/auth/callback-error.html

Why it is drawn this way

It normally lives in a popup. The page posts the code and state to the window that opened it. The opener checks the state against sessionStorage before it calls the server.

The error face shows only outside a popup. In a popup the error is posted to the opener and the window closes.

Opened directly with a code, it goes to sign-in. That is the one navigation this page performs.

It sits in the auth shell. auth/layout.tsx wraps it like every other /auth/* page.

Related

Sources

  • apps/website/src/app/auth/callback/[provider]/page.tsx
  • packages/ui/src/hooks/use-auth.ts