setup-auth

Installation
SKILL.md

Plugin check: Run node "${PLUGIN_ROOT}/scripts/check-version.js" — if it outputs a message, show it to the user before proceeding.

Set Up Authentication & Authorization

Configure authentication (login/logout) and role-based authorization for a Power Pages SPA site. This skill supports multiple identity providers -- Microsoft Entra ID, Entra External ID (for customer-facing apps with self-service sign-up), OpenID Connect (Okta, Auth0, etc.), SAML2, WS-Federation, local authentication (username/password), Microsoft Account, Facebook, and Google. It also supports optional features including invitation-based registration and Terms & Conditions acceptance. Power Pages built-in 2FA is intentionally not scaffolded because the SendCode/VerifyCode pages are server-rendered and cannot be integrated into a SPA experience — use IdP-level MFA instead. It creates an auth service, type declarations, authorization utilities, auth UI components, and role-based access control patterns appropriate to the site's framework and chosen identity provider(s).

Core Principles

  • Client-side auth is UX only — Power Pages authentication is server-side (session cookies). Client-side role checks control what users see, not what they can access. Server-side table permissions enforce actual security.
  • Framework-appropriate patterns — Every auth artifact (hooks, composables, services, directives, guards) must match the detected framework's idioms and conventions.
  • Development parity — Include mock data for local development so developers can test auth flows and role-based UI without deploying to Power Pages.
  • Preserve site integrity — Before changing navigation, auth pages, dialogs, or role-based UI, read ${PLUGIN_ROOT}/references/site-modification-integrity.md. Synchronize all visible auth states across configured locale resources and keep them bidirectional and expansion-safe.

Initial request: $ARGUMENTS

Installs
263
GitHub Stars
1.1K
First Seen
Mar 6, 2026