skills/descope-auth/SKILL.md
Integrate Descope authentication into applications. Use when implementing login, signup, passwordless auth (OTP, Magic Link, Passkeys), OAuth, SSO, or MFA. Detects framework and provides targeted guidance.
npx skillsauth add descope/skills descope-authInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Integrate secure, passwordless authentication using Descope Flows and SDKs.
Detect the user's framework and use the appropriate reference:
| If project has... | Use reference |
|-------------------|---------------|
| next in package.json | references/nextjs.md |
| react (no Next.js) | references/react.md |
| Python/Node.js backend only | references/backend.md |
NEXT_PUBLIC_DESCOPE_PROJECT_ID=<your-id><Descope> component renders the login form. Check the browser console — a missing or invalid Project ID produces a clear Could not load flows error.// src/app/login/page.tsx
import { Descope } from '@descope/nextjs-sdk';
export default function LoginPage() {
return (
<Descope
flowId="sign-up-or-in"
onSuccess={(e) => console.log('Authenticated:', e.detail.user)}
onError={(e) => console.error('Auth failed:', e.detail)}
/>
);
}
For React SPA or backend-only setups, see the framework-specific references below.
| Flow ID | Purpose |
|---------|---------|
| sign-up-or-in | Combined signup/login (RECOMMENDED) |
| sign-up | Registration only |
| sign-in | Login only |
| step-up | MFA step-up authentication |
| update-user | Profile updates, add auth methods |
| Method | When to use | |--------|-------------| | OTP (Email/SMS) | Quick verification codes | | Magic Link | Passwordless email links | | Passkeys | Biometric/WebAuthn (most secure) | | OAuth | Social login (Google, GitHub, etc.) | | SSO | Enterprise SAML/OIDC | | Passwords | Traditional auth (not recommended) |
validateSession()references/nextjs.md - Next.js App Router integrationreferences/react.md - React SPA integrationreferences/backend.md - Backend session validationdevelopment
Use this skill whenever anyone asks about migrating from WorkOS to Descope — whether they're a developer doing it themselves or a technical lead evaluating the move. Triggers on: "how do I migrate from WorkOS", "replace WorkOS with Descope", "we're moving off WorkOS", "WorkOS to Descope", "switch from WorkOS", "our app uses @workos-inc/node / @workos-inc/authkit-nextjs / AuthKit / WorkOS SSO / Directory Sync / SCIM and we want to use Descope instead", or any question about WorkOS features (AuthKit, Organizations, Enterprise SSO, Directory Sync/SCIM, Admin Portal, RBAC, FGA, Audit Logs, Radar, Pipes) in the context of Descope. Works for any language or framework with a Descope SDK. Always use this skill before producing migration guidance — do not rely on memory alone.
development
Use when building React "Bring Your Own Screen" (BYOS) custom UI on top of a Descope flow — takes exported flow JSONs, extracts the real interaction IDs and outputs, generates BYOS components that match hosted parity, and avoids the rediscovery-the-hard-way failure modes (silent form rejection, shared screen-name collisions, anonymous-session stickiness, nested-form hydration errors, wrong form keys, dead-end buttons, missing OAuth provider field).
development
Use this skill whenever anyone asks about migrating from Okta Customer Identity Service (CIS) to Descope — whether they're a developer doing it themselves or a technical lead evaluating the move. Triggers on: "how do I migrate from Okta", "replace Okta CIS with Descope", "we're moving off Okta", "Okta to Descope", "switch from Okta", "our app uses okta-auth-js / @okta/okta-react / @okta/okta-angular / @okta/oidc-middleware / okta-jwt-verifier and we want to use Descope instead", or any question about Okta CIS features (Sign-On Policies, Authorization Servers, Authenticators, Identity Providers, Log Streams, Service Apps, scp claim) in the context of Descope. Works for any language or framework with a Descope SDK. Always use this skill before producing migration guidance — do not rely on memory alone.
development
Set up and manage Descope projects with Terraform. Use when configuring authentication infrastructure as code, managing environments, creating roles/permissions, setting up connectors, or deploying Descope project configurations.