.dev

Authentication

How Feeef tokens, abilities and sign-in methods work across the platform.

Token model

Feeef uses opaque database-backed access tokens (not JWTs). Send them on every request:

Authorization: Bearer oat_...
PropertyValue
FormatOpaque string (oat_ prefix), verified server-side
Lifetime90 days
AbilitiesArray of scope strings stored on the token
First-party tokens["*"] — full account access (dashboard/portal sign-ins)
OAuth tokensExactly the scopes the user consented to, plus a binding to the issuing app

A token failing a scope check receives 403 with error: "insufficient_scope", the requiredScope field and a WWW-Authenticate header (RFC 6750).

Sign-in methods

All first-party endpoints live under /v1/users/auth:

MethodEndpointNotes
Email + passwordPOST /users/auth/signinBody {email, password, fcmToken?}{user, token}
Sign upPOST /users/auth/signup{name, email, password, phone?, referral?}201 {user, token} (rate limited)
Restore sessionGET /users/authWith bearer header → {user, token} ("me")
SocialPOST /social/{google|github|apple|facebook}/callbackExchange the provider code; also link/unlink endpoints
Passkeys (WebAuthn)POST /passkeys/register/start|finish, POST /passkeys/authenticate/start|finishFull passwordless support
One-time auth codePOST /users/auth/codePOST /users/auth/code/consumeQR / cross-device login: mint a single-use code (2 min TTL) on a signed-in device, consume it on another
OAuth (third-party)GET /oauth/authorize + POST /oauth/tokenThe flow your apps use — see OAuth

Managing sessions

Every issued token is a session you can inspect and revoke:

ActionEndpoint
List sessionsGET /users/auth/tokens (abilities, last used, expiry — hash never returned)
Revoke oneDELETE /users/auth/tokens/:identifier
Revoke allPOST /users/auth/tokens/revoke-all
Sign out (current token)POST /users/auth/signout
List authorized OAuth appsGET /users/auth/connected-apps

The dashboard's API sessions page is a UI over exactly these endpoints.

Password reset & email verification

ActionEndpoint
Request reset emailPOST /users/auth/reset-password {email}204
Confirm resetPOST /auth/web/reset-password-confirm {uid, token, newPassword}
Resend verify emailPOST /users/auth/verify-email/resend
Confirm emailPOST /users/auth/verify-email/confirm {code}

Choosing an auth strategy

You are building…Use
A personal script / server-to-server job on your own accountA first-party token from POST /users/auth/signin (keep it in a secret manager)
A product other Feeef users sign in toOAuth authorization code — scoped tokens, consent screen, revocable per app
A CLI or desktop toolOAuth public client with PKCE (that is exactly how @feeef.dev/cli works)
A storefront themeNo credentials — themes run in the shopper's browser against public endpoints; see Templates

There are no refresh tokens today. Access tokens live 90 days; when one expires, run the sign-in or OAuth flow again. Design your integration to detect 401 and re-authenticate.

On this page