Authentication & Authorization System Skill

Implement JWT authentication, RBAC, and OAuth for Angular and Node.js LMS.

Updated Aug 21, 2021
One-click install
npx skills add https://github.com/ZouZou/angular-sample-app --skill authentication-authorization-system-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Authentication & Authorization System Skill
Source: https://github.com/ZouZou/angular-sample-app/tree/main/.claude/skills/auth-system
Command: npx skills add https://github.com/ZouZou/angular-sample-app --skill authentication-authorization-system-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires typeorm, bcrypt, jsonwebtoken.

What problem does it solve?

This Skill provides a secure, scalable authentication and authorization backbone for an LMS, reducing risk from weak passwords, improper access controls, and fragmented login flows.

Core Features & Use Cases

  • User management & RBAC: Roles (student, instructor, admin, moderator) with granular permissions to control access to resources.
  • JWT-based auth & OAuth: Secure login using tokens and external providers (Google, GitHub) to streamline sign-in.
  • Security hardening: Password hashing, account lockout after failed attempts, password reset, email verification, and optional 2FA.
  • Session & device management: Track sessions, remember-me, and IP-based controls for improved security.
  • Account lifecycle: Email verification, profile management, and session management to keep accounts up-to-date.

Quick Start

  1. Configure your JWT secret and OAuth providers in backend/config.
  2. Run the backend server and create an admin user.
  3. Test login with credentials, then verify email verification and password reset flows.

Frequently Asked Questions about Authentication & Authorization System Skill

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

FAQPage Schema
How do I implement JWT-based authentication for a Node.js web application?

JWT-based authentication secures login by issuing signed tokens after credential verification. Configure a JWT secret in your backend, hash passwords with bcrypt, issue tokens on successful login, and validate tokens on protected routes. This Skill provides a production-ready implementation with refresh token lifecycle, token expiry enforcement, and session management for Node.js apps.

What's the best way to add OAuth 2 login with Google and GitHub to my app?

OAuth 2 integration streamlines sign-in by delegating authentication to external providers. This Skill implements Google and GitHub OAuth flows, handling token exchange, user profile retrieval, and account linking. Configure provider credentials in your backend config, then users can sign in without managing passwords directly.

How do I set up role-based access control (RBAC) with permissions?

RBAC controls resource access by assigning roles (student, instructor, admin, moderator) with granular permissions to users. This Skill defines enhanced User and Permission entities, maps permissions to roles, and enforces checks on protected endpoints. Result: fine-grained access control matching your organizational hierarchy.

Can I add two-factor authentication and account lockout to my authentication system?

Yes. This Skill includes optional two-factor authentication and account lockout after failed login attempts to harden security. It also covers email verification, password reset flows, and session management to prevent unauthorized access and meet compliance requirements.

What dependencies and setup do I need for a secure authentication system?

Authentication requires typeorm for database modeling, bcrypt for password hashing, and jsonwebtoken for token generation and validation. This Skill implements these dependencies in a full-stack Angular + Node.js environment, handling user registration, email verification, and session lifecycle management out of the box.

Does this authentication system work with remember-me and session management?

Yes. This Skill implements remember-me functionality, session tracking, and IP-based device controls for enhanced security and user convenience. Sessions are persisted and validated to ensure only authorized access, with configurable expiry and logout handling across devices.