authentication
>
Works with
--- name: authentication description: > license: MIT --- # Authentication The Boring JavaScript Stack uses **session-based authentication** with multiple sign-in methods. The Ascent templates provide production-ready implementations of password auth, magic links, passkeys, two-factor authentication, password reset, and OAuth — all built on Sails.js actions, helpers, and policies. ## When to Use Use this skill when: - Implementing signup and login flows (password or magic link) - Adding passkey (WebAuthn) support with `@simplewebauthn` - Setting up two-factor authentication (TOTP, email codes, backup codes) - Building password reset flows with secure token handling - Integrating OAuth providers (Google, GitHub) via `sails-hook-wish` - Configuring authentication policies (`is-authenticated`, `is-guest`, `has-partially-logged-in`) - Understanding the `req.me` / `req.session.userId` pattern and return URL handling - Working with the User model's auth-related attributes and lifecycle callbacks ## Rules Read individual rule files for detailed explanations and code examples: - [rules/getting-started.md](rules/getting-started.md) - Auth architecture, User model overview, policies, req.me, return URL - [rules/password-auth.md](rules/password-auth.md) - Signup and login flows, password hashing, remember me, validation - [rules/magic-links.md](rules/magic-links.md) - Token generation/hashing, request/verify actions, auto-signup, security - [rules/passkeys.md](rules/passkeys.md) - WebAuthn with @simplewebauthn, registration and authentication flows - [rules/two-factor.md](rules/two-factor.md) - TOTP, email 2FA, backup codes, partial login state, verify-2fa action - [rules/password-reset.md](rules/password-reset.md) - Forgot/reset flow, token lifecycle, email integration, security - [rules/oauth.md](rules/oauth.md) - Wish library, Google/GitHub OAuth, redirect/callback, findOrCreate pattern
More Security skills
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
azure-messaging
microsoft/azure-skills
Troubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus. Covers connection failures, authentication errors, message processing issues, and SDK configuration problems. WHEN: event hub SDK error, service bus SDK issue, messaging connection failure, AMQP error, event processor host issue, message lock lost, message lock expired, lock renewal, lock renewal batch, send timeout, receiver disconnected, SDK troubleshooting, azure messaging SDK, event hub consumer, service bus queue issue, topic subscription error, enable logging event hub, service bus logging, eventhub python, servicebus java, eventhub javascript, servicebus dotnet, event hub checkpoint, event hub not receiving messages, service bus dead letter, batch processing lock, session lock expired, idle timeout, connection inactive, link detach, slow reconnect, session error, duplicate events, offset reset, receive batch.
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

