aiskillstore/marketplace / skills/aayushbaniya2006/auth-handler
auth-handler
VerifiedManage authentication, authorization, and user sessions. Use when dealing with login, sign-up, API protection, middleware, or user data fetching.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.0 KB |
| reference.md | markdown | 786 B |
| skill-report.json | config | 16.5 KB |
reference.md
View on GitHub# Auth Architecture Reference
## Key Files
- **Config**: `src/auth.ts` (NextAuth v5, Providers, Adapter)
- **Schema**: `src/db/schema/user.ts`
- **Middleware**: `src/proxy.ts` (Route protection)
## Helpers
- `src/lib/auth/withAuthRequired.ts`
- `src/lib/auth/withSuperAdminAuthRequired.ts`
- `src/lib/auth/cronAuthRequired.ts`
- `src/lib/users/useUser.ts` (Frontend hook)
## Best Practices
1. **Defense in Depth**: Middleware (`proxy.ts`) is the first layer, but route wrappers are mandatory.
2. **Database**: Update `src/db/schema/user.ts` for user model changes.
3. **Environment**: Check `AUTH_SECRET`, `GOOGLE_CLIENT_ID`, `SUPER_ADMIN_EMAILS`.
## Common Tasks
- **Debugging Login**: Check providers in `auth.ts`.
- **Impersonation**: Supported via custom Credentials provider.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |