What problem does it solve? Wiring OAuth 2.1 Authorization Code + PKCE login into a Next.js App Router app involves many subtle pieces — PKCE generation, state validation, token exchange, cookie scoping, silent refresh, and RP-initiated logout — and getting any one wrong breaks the flow or leaks secrets. This Skill provides drop-in templates and guidance so the integration works correctly the first time. ## Core Features & Use Cases - Drop-in auth templates: Provides lib/pkce.ts, lib/auth-actions.ts (login/signup/logout Server Actions), lib/session.ts, callback and refresh Route Handlers, and a route-protection middleware.ts. - Full session lifecycle: Covers login, signup (with new_user onboarding branch), silent token refresh with refresh-token rotation, and OIDC RP-Initiated Logout against the Overlens IDP. - Next.js-specific guardrails: Documents App Router pitfalls such as async cookies(), Edge-runtime middleware limits, NEXT_PUBLIC_ secret leakage, and seconds-based maxAge. - Use Case: You have a Next.js App Router project and want users to sign in with their Overlens account — the Skill scaffolds the entire flow, from the login button to the protected dashboard. ## Quick Start Ask the assistant to add Overlens login to your Next.js app and it will copy the six template files, configure the required environment variables, and wire up login, callback, refresh, and logout.