Menu
Platform
AI
App store purchases
Credits
Database
Flags
Generated Assets
Monitoring
Notifications
Organizations
Payments
- Payments
- Payments quickstart
- Checkout policies
- Checkout sessions
- Customer subscriptions
- Entitlement grants
- Exchange rates
- Licence keys
- Licence tokens
- Merchant accounts
- Portal sessions
- Price catalogs
- Revenue
- Revenue facts
- Revenue sources
- Tax threshold statuses
- Usage events
- Usage invoices
- Usage meter prices
- Usage meters
- Usage reservations
- Usage settings
- Usage tiers
Queues
Realtime
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Auth
What Auth serves, the keys it uses, and how a sign-in reaches your app.
Auth signs in the people who use your app. They are end users: a record in your environment, never a Sylphx account. Auth holds their passwords (hashed and checked against breached passwords), their sessions and their sign-in history, so your app does not.
You work with Auth in two places.
- Your server manages end users and their sessions through the one API at
https://api.sylphx.com, with your secret key. - Your pages sign users in through the client API at
https://api.sylphx.com/v1/client, with a publishable key that is safe to ship in a browser.
#What is served
| Method | Status |
|---|---|
| Email and password, with sign-up and an email verification link | Served. |
| Google, on Sylphx's shared Google client | Served. Nothing to set up in the Google console. |
| Google, GitHub and Apple on your own client | Served. GitHub and Apple need your own client: Sylphx has no shared GitHub or Apple client. |
| A TOTP second factor at sign-in | Served for a user who has an active factor: password sign-in then needs a totp or recovery_code proof. |
| Hosted sign-in, consent and device approval pages | Served, on the Account Portal. |
| Magic link, email code and passkeys | Not served on the client API. GET /v1/client/config reports each method as enabled or not, so render your sign-in from it. |
Every provider returns to one callback: https://api.sylphx.com/v1/oidc/callback.
When you bring your own Google, GitHub or Apple client, register exactly that
URL with the provider.
#The two keys
- Publishable key
- sylphx_pk_live_… or sylphx_pk_test_…, scope auth:public. For the client API. Public by design.
- Secret key
- sylphx_sk_…, scope auth:read and auth:write. For end_users and sessions. Server only.
The platform delivers SYLPHX_PUBLISHABLE_KEY to every environment's services at
runtime, not at build time. Read it on your server and pass it to the page.
#How a sign-in reaches your app
- The page reads
GET /v1/client/config?publishable_key=…: the enabledmethods, thesocialproviders with theirstart_url, and your branding. - The user signs in. Password:
POST /v1/client/sign-in/password. Social: send the browser to/v1/client/oauth/{provider}/start?publishable_key=…&redirect_url=…. - With the default
session_mode: "server", the page receives a one-time ticket (two minutes, one use), asauth_ticketon yourredirect_urlor in the password answer. Your server redeems it withPOST /v1/client/tickets:redeemand keeps the session in anHttpOnlycookie. No bearer token is ever readable by page script. Apps with no backend usesession_mode: "browser"and hold the session bearer. GET /v1/client/sessionreturns the current session and user, andPOST /v1/client/sign-outends it.
An error is a JSON object with a stable code: invalid_request,
unauthorized, mfa_required, forbidden, not_found, conflict,
locked_out (with Retry-After), rate_limited, internal and
store_unavailable. mfa_required means the user has a second factor: send it
as factor_proofs on the next password sign-in. Sign-up always answers
202 {"accepted": true}, whether or not the email already has an account.
#Manage end users from your server
sylphx auth end-users list orgs/acme/projects/shop/envs/production
sylphx auth sessions list orgs/acme/projects/shop/envs/production/end_users/<user>
sylphx auth end-users revoke-sessions orgs/acme/projects/shop/envs/production/end_users/<user>Deleting an end user is revocation: every session ends and new sign-ins are refused. The quickstart creates, reads and deletes one.
#Sign in a CLI or an agent: the device flow
For a program with no browser form, Auth serves the OAuth device grant (RFC
8628). An OAuth client that allows the device grant calls
POST https://api.sylphx.com/v1/oauth/device_authorization and receives a
device_code, a short user_code and a verification_uri: the Account
Portal's /device page. The user opens …/device?user_code=ABCD-EFGH
(?code= works too) or opens /device and types the code, signs in, and
approves or denies. The program polls POST /v1/oauth/token with the device
grant until it is approved. sylphx login uses the same pattern against
sylphx.com/device. The oauth_clients collection in the API reference is not
routed on api.sylphx.com: write to hi@sylphx.com and we register a client
for your environment.