auth

Implement authentication and authorization for TypeScript SaaS applications.

3|1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/jon23d/skillz --skill auth-jon23d
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth
Source: https://github.com/jon23d/skillz/tree/main/skills/auth
Command: npx skills add https://github.com/jon23d/skillz --skill auth-jon23d

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and implementation patterns for building secure authentication and authorization systems in TypeScript SaaS applications, covering everything from user sign-up and login to role-based access control and frontend protection.

Core Features & Use Cases

  • Authentication Strategies: Compares JWT and database sessions, recommending better-auth for a hybrid approach.
  • Implementation Examples: Demonstrates backend setup with better-auth, password hashing with Argon2, and JWT patterns.
  • Access Control: Details middleware for route protection and role-based access control (RBAC) with permission checks.
  • Frontend Integration: Shows how to protect routes in React and Next.js applications.
  • Security Best Practices: Covers rate limiting, audit logging, CSRF protection, and secure cookie handling.
  • Use Case: Implementing a secure login system for a new SaaS product, ensuring only authorized users can access specific features based on their roles.

Quick Start

Use the auth skill to implement secure user login and session management for your TypeScript application.

Frequently Asked Questions about auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement authentication and authorization in a TypeScript SaaS application?

Implementing authentication and authorization in a TypeScript SaaS application involves selecting a strategy like JWT or database sessions, managing credentials with Argon2 hashing, and applying middleware for route protection. This Skill provides the necessary implementation patterns and security best practices, including OAuth integration and role-based access control (RBAC).

What is the best way to manage user sessions and passwords for a new SaaS product?

The best way to manage user sessions and passwords for a new SaaS product is using a hybrid approach with `better-auth` for session management and Argon2 for secure password hashing. This setup supports both JWT and database sessions while ensuring robust credential security.

How do I set up role-based access control (RBAC) and protect routes in my web application?

Setting up role-based access control (RBAC) and protecting routes requires applying middleware for backend route protection and integrating frontend security patterns in frameworks like React and Next.js. This ensures permission checks are enforced and only authorized users access specific features.

Does this auth implementation guide support OAuth integration and frontend frameworks like Next.js?

Yes, this auth implementation guide supports OAuth integration and demonstrates frontend security patterns specifically for React and Next.js applications. It details how to secure frontend routes and manage session cookies alongside backend access control mechanisms.

What security best practices should I follow when implementing JWT and database sessions?

When implementing JWT and database sessions, follow security best practices like rate limiting, audit logging, CSRF protection, and secure cookie handling. These measures prevent unauthorized access and ensure robust session management across your SaaS application.