moonshine-security-v4

Configure MoonShine v4 authentication, authorization, and access control.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/agarzon/moonshine-v4-skills --skill moonshine-security-v4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moonshine-security-v4
Source: https://github.com/agarzon/moonshine-v4-skills/tree/main/moonshine-security-v4
Command: npx skills add https://github.com/agarzon/moonshine-v4-skills --skill moonshine-security-v4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement and customize MoonShine v4 security so your admin panel uses the right authentication, authorization, and access-control rules without guesswork.

Core Features & Use Cases

  • Authentication setup: Configure guards, middleware, user models, login pages, profile pages, and user field mappings for MoonShine v4.
  • Authorization control: Enable resource policies, define role-based access, and apply global authorization rules across the panel.
  • Advanced security flows: Add auth pipelines, custom login and logout responses, Socialite login, two-factor authentication, and JWT-based API access.
  • Use case: Secure an internal admin dashboard by restricting panel entry to specific roles, redirecting selected users into 2FA, and aligning the panel with a custom admin user schema.

Quick Start

Ask the AI to configure MoonShine v4 security for my panel by setting up authentication, authorization, and any needed custom login, 2FA, or role-based access rules.

Frequently Asked Questions about moonshine-security-v4

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

FAQPage Schema
How do I configure authentication and authorization in a MoonShine v4 admin panel?

MoonShine v4 authentication and authorization is configured by setting up guards, middleware, custom user models, and login pages. You apply resource policies and role-based middleware to restrict panel access and enforce secure login.

Can I use Laravel Socialite for login in MoonShine v4?

Yes, MoonShine v4 supports Socialite login integration. You can configure social authentication within the auth pipeline alongside custom login responses to allow users to access the admin panel via external OAuth providers.

What is the best way to enforce role-based access control in MoonShine v4?

Role-based access control in MoonShine v4 is enforced by defining resource policies and applying global authorization rules. You map custom admin user schemas to specific roles and use middleware to restrict panel entry accordingly.

Does MoonShine v4 support two-factor authentication and JWT for API access?

Yes, MoonShine v4 supports advanced security flows including two-factor authentication and JWT-based API access. You can redirect selected users into 2FA pipelines and configure JWT for secure external API integrations.

How do I customize login and logout responses in MoonShine v4?

You customize login and logout responses in MoonShine v4 by configuring auth pipelines. This allows you to define custom redirection rules and response handling for specific users during the authentication flow.

Why are my MoonShine v4 resource policies not restricting access correctly?

MoonShine v4 resource policies require properly mapped user field schemas and configured guards. If authorization fails, verify your global authorization rules and ensure the custom user model aligns with the expected policy definitions.