Authentication
Managed sign-up, sign-in, sessions, Google & GitHub OAuth, and lintable transactional email templates.
Turnkey auth service
Every workspace ships with a managed auth service: sign-up and sign-in with email/password, optional social login (Google, GitHub), session tokens, email verification, password reset, magic links, and invites. It runs in the browser (sign-in/up, token persistence) and on the backend (session validation, API key checks).
Setup
Auth configuration is grouped; your agent checks what's missing and fills only that:
- core
- Your app's
siteUrlandredirectUrls— your agent infers these from your project config and asks you to confirm. - Google OAuth —
clientIdand redirect URI are saved via the agent; the client secret is pasted in the browser. - github
- GitHub OAuth — same split: non-secret fields via the agent, secret via a Settings deep link.
- smtp
- Bring-your-own email sender (host, port, username, from address) — or use Codata-managed email instead.
Secrets (OAuth client secrets, SMTP passwords) never travel through chat or MCP. Codata returns a deep link to the Settings page where you paste them directly; they're write-only after that.
Social login
Create OAuth credentials
In Google Cloud Console (or GitHub Developer Settings), create an OAuth app with the authorized redirect URI Codata provides.
Save the client ID
Your agent saves the non-secret fields; you paste the client secret via the Settings deep link.
Apply changes
Auth config changes are staged until applied — your agent triggers the redeploy once everything is in place. (This is the usual reason a saved change "doesn't show up" yet.)
Email templates
Six transactional templates are customizable: confirmation (email verification), recovery (password reset), magic link, invite, email change, and reauthentication. Templates support token syntax like {{ .ConfirmationURL }}, and every custom template is rendered and linted before use — deliverability issues (image-only bodies, spam phrases, broken links, From-domain mismatch, missing required tokens) are flagged with a preview.
Using auth from the SDK
const ws = client.workspace(id, { branch: "main", auth: {} });
// Sign-up / sign-in
await ws.auth.signUp({ email, password });
const session = await ws.auth.signIn({ email, password });
// Anonymous & OAuth
await ws.auth.signInAnonymously();
await ws.auth.startGoogleSignIn();
// Sessions
const current = await ws.auth.getSession();
await ws.auth.logout();