Endpoints
Every route auth.setup(app) mounts. They all appear in your app's
own /docs page too, documented and ready to try.
Authentication#
/tokenLog in; returns access + refresh tokens, sets the cookie when enabled
/token/refreshExchange a refresh token for a new access token
/usersRegister a new user; username and email must be unique
/users/meThe current authenticated user's profile
/logoutClear the authentication cookie
/logout/allRevoke every token for the current user, on all devices
Account flows#
/password/forgotIssue a reset token; always 200, delivered via your hook
/password/resetSet a new password with a single-use reset token
/password/changeChange the logged-in user's password; revokes old sessions
/email/verify/requestIssue an email verification token for the logged-in user
/email/verifyConfirm an email address with a verification token
Role management#
/roles/List all roles
/roles/adminCreate a new role
/roles/{role_id}Get a role by ID
/roles/{role_id}adminUpdate a role
/roles/{role_id}adminDelete a role
/roles/assign/{user_id}/{role_id}adminAssign a role to a user
/roles/assign/{user_id}/{role_id}adminRemove a role from a user
/roles/user/{user_id}List a user's roles