Feature 09 · Study guide
Enable AuthRole + User, issue access/refresh tokens, and protect the admin UI.
$ tpy auth $ pip install -r requirements.txt $ tpy migrate && tpy seed $ tpy serve
Default seeded login: admin@example.com / admin123 (super-admin).
AuthRole, User (password hashed)./auth/*.| Endpoint | Purpose |
|---|---|
POST /auth/register | Create user |
POST /auth/login | Return access + refresh |
POST /auth/refresh | Rotate access using refresh |
POST /auth/logout | Revoke refresh |
GET /auth/me | Current user profile |
Authorization: Bearer <access> on protected routes.Dashboard access: super-admin and developer. The admin role is API-oriented by default.