authentication-and-authorization-fullstack
Installation
SKILL.md
Authentication And Authorization Fullstack
Use When
- Adding login, signup, SSO, or session refresh flows
- Enforcing role-based or permission-based access across UI and API
- Reviewing security controls for identity-sensitive features
Workflow
- Define identity model (users, tenants, roles, permissions, claims).
- Choose session strategy (cookie session, JWT, or hybrid) with threat model.
- Implement backend middleware or guards for coarse and fine-grained authorization.
- Implement frontend route and component guards without exposing privileged actions.
- Add audit logs for sensitive operations and failed access attempts.
- Validate token expiry, refresh flow, revocation, and logout semantics.