# Auth

> Sign-up and sign-in for the people who use your app, with sessions you control and e-mails sent through the provider you choose.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://data.docs.sypnia.com/auth/

For agents: Section index for user auth in Sypnia Data: e-mail and passwords (sign-up with or without password, confirmation, recovery, magic link and 6-digit code, reauthentication), sessions and tokens (EdDSA access JWTs, rotating refresh tokens with reuse detection, session policies including never), Google and GitHub (SSO) with PKCE, e-mail providers and templates, auth users vs your product's own users, and the built-in protections.

Auth is the part of the engine that knows who people are. It lives at `/auth/v1` on your project's address and keeps everything in the `sypnia_auth` schema of your own database.

A user in Sypnia Data holds **identity and sessions only**: an e-mail, a password hash, the providers they signed in with, and their devices. What a person may do in your app, their plan, their team, their role, lives in **your** tables, next to your data. [Users and your app's own data](https://data.docs.sypnia.com/auth/users-and-your-data) explains the pattern.

- [E-mail and passwords](/auth/email-and-passwords/): Sign-up with or without a password, e-mail confirmation, sign-in, recovery, magic links and codes, and changing e-mail or password safely.
- [Sessions and tokens](/auth/sessions-and-tokens/): Access tokens, refresh tokens, how long a session lives, and how to end one, including sessions that never expire.
- [SSO with Google and GitHub](/auth/oauth-providers/): Single sign-on (SSO): let people sign in with Google or GitHub, with PKCE, and link those sign-ins to an existing account.
- [E-mail providers and templates](/auth/email-providers-and-templates/): Which service sends your auth e-mails, how to connect your own or Sypnia Mail, and how to edit every e-mail in English, Spanish or any language.
- [Users and your app's own data](/auth/users-and-your-data/): Why an auth user holds only identity and sessions, where your app keeps profiles and roles, and how several apps share one sign-in.
- [Built-in protections](/auth/protections/): Rate limits, lockout, CAPTCHA, the audit log and the other defences every project has from the start.

## The API keeps a familiar shape

The endpoints follow the shape of Supabase's auth server (GoTrue): `/auth/v1/signup`, `/auth/v1/token?grant_type=password`, `/auth/v1/verify`, `/auth/v1/user`. Code written for `supabase-js` auth moves to `@sypnia/data` with few changes. The full list is in [Auth endpoints](https://data.docs.sypnia.com/api/auth-endpoints).
