Implement Secure Authentication and Authorization
Skill for building secure auth systems - session/JWT/OIDC strategy, RBAC authorization, secrets rotation, and audit logging.
Why it matters
Build robust and scalable authentication and authorization systems using industry-standard patterns. Secure your APIs and manage user access effectively.
Outcomes
What it gets done
Design and implement user authentication flows.
Secure REST or GraphQL APIs with robust authorization.
Integrate OAuth2, social login, or SSO solutions.
Plan and manage secrets, session management, and RBAC.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-auth-implementation-patterns | bash Overview
Authentication & Authorization Implementation Patterns
A skill for building secure authentication and authorization systems, covering auth strategy selection, authorization modeling, and secrets/audit handling. Use for implementing or securing auth systems, OAuth2/SSO, or RBAC; not for UI-only login styling or infrastructure work with no identity concerns.
What it does
This skill builds secure, scalable authentication and authorization systems using industry-standard patterns. Its process: define users, tenants, flows, and threat-model constraints; choose an auth strategy (session-based, JWT, or OIDC) and token lifecycle; design the authorization model and its policy enforcement points; and plan secrets storage, rotation, logging, and audit requirements. A detailed implementation playbook (resources/implementation-playbook.md) covers deeper patterns and examples.
When to use - and when NOT to
Use this when implementing user authentication systems, securing REST or GraphQL APIs, adding OAuth2/social login or SSO, designing session management or role-based access control (RBAC), or debugging authentication/authorization issues.
Not the right skill for UI copy or login page styling with no underlying auth logic change, for infrastructure-only work with no identity concerns, or when you can't actually change auth policies or credential storage - there's nothing to implement if the policy is fixed and out of scope.
Inputs and outputs
Inputs: the system's users/tenants, required auth flows (login, SSO, OAuth2), and threat-model constraints.
Outputs: a chosen auth strategy (session, JWT, or OIDC) with defined token lifecycle, an authorization model with policy enforcement points, and a secrets storage/rotation/logging/audit plan - with the hard rule that secrets, tokens, and credentials are never logged, and least-privilege plus secure key storage are enforced throughout.
Integrations
OAuth2, OIDC, JWT, session-based auth, RBAC - applies broadly across REST and GraphQL APIs independent of a specific vendor.
Who it's for
Backend and security engineers implementing or securing authentication/authorization systems who need a structured process from threat model through token strategy, authorization design, and secrets handling.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.