photogallery-auth

Implement OAuth, JWT, and RBAC authentication for PhotoGallery with EF Core.

1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/ArmyGuy255A/PhotoGallery --skill photogallery-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: photogallery-auth
Source: https://github.com/ArmyGuy255A/PhotoGallery/tree/main/skills/photogallery-auth-skill
Command: npx skills add https://github.com/ArmyGuy255A/PhotoGallery --skill photogallery-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PhotoGallery authentication and authorization challenge: enabling secure, extensible login via external providers, robust RBAC, and API token management across frontend and backend.

Core Features & Use Cases

  • External OAuth providers (Google, Facebook, Microsoft) for login
  • Internal role-based access control (Admin, User, Visitor)
  • JWT-based API tokens with refresh support
  • Claims-based authorization and fine-grained permissions
  • Extensible provider integration via a factory pattern
  • Visitor access via time-limited access codes
  • Development bypass (DISABLE_AUTH) for testing

Quick Start

Design and implement the PhotoGallery authentication system by wiring OAuth, JWT, and RBAC into the backend and frontend workflow.

Frequently Asked Questions about photogallery-auth

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

FAQPage Schema
How do I implement OAuth and JWT authentication with Entity Framework Core?

OAuth and JWT authentication with Entity Framework Core is implemented by configuring provider-agnostic token validation middleware, a JwtTokenService for issuance, and EF Core user mappings for persistence. This setup enables multi-provider external logins and secure API access.

How does role-based access control work with JWT claims?

Role-based access control with JWT claims works by assigning users to internal roles like Admin, User, or Visitor, then embedding those roles as claims in the JWT. The backend validates the token to enforce fine-grained, claims-based authorization permissions.

Can I bypass JWT authentication during development and testing?

You can bypass JWT authentication during development by using the configuration-based DISABLE_AUTH bypass pattern. This allows testing frontend and backend workflows without requiring valid OAuth logins or active token validation.

What is the best way to support multiple OAuth providers in a .NET backend?

The best way to support multiple OAuth providers in a .NET backend is using an extensible factory pattern. This integrates Google, Facebook, and Microsoft logins while maintaining provider-agnostic token validators and centralized JWT token management.

How do I set up time-limited access codes for visitor authentication?

Time-limited access codes for visitor authentication are set up by generating temporary tokens mapped to the Visitor role. The JWT token service manages these specific token lifecycles, allowing restricted, expiring access for non-registered users.

How do I seed an admin user during JWT and RBAC system initialization?

Admin users are seeded during JWT and RBAC system initialization through configuration-based admin seeding. By defining default admin credentials and roles in the configuration, EF Core automatically persists the initial admin user on startup.