BurnGuard supports three authentication paths: OAuth via GitHub, OAuth via Google, and WebAuthn passkeys. The OAuth flows are browser-redirect flows — the dashboard navigates the user to the provider’s authorization page and the callback handler sets up a server-side session. Passkey flows use two-step begin/finish calls driven by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Verifieddanny/BurnGuard/llms.txt
Use this file to discover all available pages before exploring further.
@simplewebauthn/browser library on the frontend. After any successful login the caller receives a session_id that must be passed as Authorization: Bearer session_<id> on all protected endpoints.
OAuth — GitHub
GET /v1/auth/github
Redirects the browser to GitHub’s OAuth authorization page. The server constructs the URL withclient_id, scope=user:email, and prompt=consent then issues an HTTP 302 Found.
Auth: Public — no session required.
Request: No parameters or body.
Response: 302 Found redirect to https://github.com/login/oauth/authorize.
GET /v1/auth/github/callback
Handles the OAuth callback from GitHub. The handler exchanges thecode query parameter for an access token, fetches the GitHub user profile (and primary verified email if not public), upserts the user record, creates a server-side session, then issues a 303 See Other redirect back to the frontend with session_id as a query parameter.
Auth: Public — called by GitHub, not directly by users.
The authorization code returned by GitHub after the user grants access.
303 See Other redirect to {FRONTEND_URL}/auth/callback?session_id=<session_id>.
OAuth — Google
GET /v1/auth/google
Redirects the browser to Google’s OAuth 2.0 authorization page. Requestsemail and profile scopes.
Auth: Public — no session required.
Request: No parameters or body.
Response: 302 Found redirect to https://accounts.google.com/o/oauth2/v2/auth.
GET /v1/auth/google/callback
Handles the OAuth callback from Google. Exchanges thecode for a Google access token, fetches the user’s profile from the Google userinfo endpoint, upserts the user record, creates a session, then redirects the browser back to the frontend.
Auth: Public — called by Google’s OAuth service.
The authorization code returned by Google after the user grants access.
303 See Other redirect to {FRONTEND_URL}/auth/callback?session_id=<session_id>.
User Profile
GET /v1/auth/me
Returns the authenticated user’s profile along with ahas_passkey flag indicating whether at least one WebAuthn credential is registered.
Auth: Requires session — Authorization: Bearer session_<id>.
Request: No parameters or body.
Response:
Internal numeric user ID.
Display name sourced from the OAuth provider at sign-up.
Primary verified email address.
Profile picture URL from the OAuth provider.
GitHub numeric user ID. Present only when the account was created or linked via GitHub OAuth.
Google user ID string. Present only when the account was created or linked via Google OAuth.
true if the user has at least one registered WebAuthn passkey credential.Passkeys — Login
Passkey login uses a two-step WebAuthn discoverable-credential flow. The browser callsbegin to retrieve a challenge, signs it with the device authenticator, then calls finish with the signed assertion. No session is required for either step.
POST /v1/auth/passkey/login/begin
Initiates a WebAuthn discoverable-credential login ceremony. The server callsBeginDiscoverableLogin, stores the challenge-keyed session temporarily, and returns PublicKeyCredentialRequestOptionsJSON to the caller.
Auth: Public — no session required.
Request: No body required.
Response: PublicKeyCredentialRequestOptionsJSON — the WebAuthn options object to pass to navigator.credentials.get().
POST /v1/auth/passkey/login/finish
Completes the WebAuthn login. The server validates the signed assertion against the stored challenge session, updates the credential sign count, creates a server session, and returns thesession_id.
Auth: Public — no session required.
Request body: AuthenticationResponseJSON — the assertion produced by navigator.credentials.get().
Response:
The new session identifier. Store this and pass it as
Authorization: Bearer session_<id> on all subsequent authenticated requests.Passkeys — Registration
Passkey registration requires an active session — users must be signed in via OAuth before they can add a passkey to their account.POST /v1/auth/passkey/register/begin
Initiates the WebAuthn registration ceremony for the authenticated user. The server loads the user’s existing credentials (so they are excluded from being re-registered), callsBeginRegistration, stores the user-keyed session, and returns creation options.
Auth: Requires session — Authorization: Bearer session_<id>.
Request: No body required.
Response: PublicKeyCredentialCreationOptionsJSON — the options object to pass to navigator.credentials.create().
POST /v1/auth/passkey/register/finish
Completes the WebAuthn registration ceremony. The server validates the new credential against the stored session data, persists it, and returns201 Created.
Auth: Requires session — Authorization: Bearer session_<id>.
Optional human-readable label for this passkey (e.g.
"MacBook Touch ID"). Defaults to "Passkey" if omitted.RegistrationResponseJSON — the credential produced by navigator.credentials.create().
Response: 201 Created
The
passkeyRegisterFinish handler returns HTTP 201 Created (not 204). The response body contains a message field confirming successful registration.