authentication-patterns

Provide Laravel authentication and authorization patterns for multi-tenant apps, API tokens, MFA, RBAC, and session security.

3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/bipinks/ghost-office --skill authentication-patterns-bipinks
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: authentication-patterns
Source: https://github.com/bipinks/ghost-office/tree/main/.claude/skills/authentication-patterns
Command: npx skills add https://github.com/bipinks/ghost-office --skill authentication-patterns-bipinks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides structured authentication and authorization patterns to help teams implement secure, scalable access control in Laravel projects.

Core Features & Use Cases

  • Laravel Sanctum for SPA cookies and API tokens
  • RBAC with Spatie Permissions for fine-grained access control
  • Multi-tenant authentication with branch_id isolation
  • MFA and session security best practices
  • Policies and middleware examples for tenant-aware access

Quick Start

Configure Laravel Sanctum for API tokens and set up RBAC with Spatie permissions in a multi-tenant app to secure user access.

Frequently Asked Questions about authentication-patterns

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

FAQPage Schema
How do I set up Laravel Sanctum for SPA cookies and API tokens?▼

Laravel Sanctum provides authentication patterns for configuring SPA cookies and API tokens. It secures user access in single-page applications and issues API tokens for external requests within Laravel projects.

What is the best way to implement RBAC in a multi-tenant Laravel app?▼

RBAC in a multi-tenant Laravel app is best implemented using Spatie Permissions combined with branch_id isolation. This approach provides fine-grained, tenant-aware access control across your application.

Does this include policy and middleware examples for tenant-aware authorization?▼

Yes, it includes concrete policies and middleware examples for tenant-aware access. These implementations ensure users are properly isolated and authorized based on their specific tenant context.

Can I use these patterns to add MFA and session security to my application?▼

Yes, you can use these patterns to add MFA and session security to your application. They provide best practices for securing user sessions and integrating multi-factor authentication into Laravel systems.

How does OAuth 2.0 work within these Laravel authentication patterns?▼

OAuth 2.0 within these Laravel authentication patterns provides a standardized protocol for secure API access. It spans comprehensive authorization flows, allowing external clients to securely authenticate against your Laravel application.