Authentication
Passflow uses Sanctum bearer tokens. Tokens grant access to the user’s tenant memberships and must be kept server-side.
Register
POST
/auth/registerPublicJSON body
{
"name": "Ada Owner",
"email": "[email protected]",
"password": "password123",
"password_confirmation": "password123",
"company_name": "Ada Coffee"
}A successful response has status 201 and includes user, tenant, and token.
Log in
POST
/auth/loginPublicRequest
curl -X POST https://stpasses.your-app-website.com/api/v1/auth/login \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"password123"}'Authorize requests
Headers
Accept: application/json
Authorization: Bearer YOUR_TOKENList tenants
GET
/tenantsBearer tokenReturns every workspace the authenticated user belongs to, including their membership role.
Log out
POST
/auth/logoutBearer tokenRevokes the token used for the current request and returns 204 No Content.
Keep tokens private
Do not embed API tokens in public pages, mobile binaries, or frontend source code. Issue requests through a trusted backend.