Lucia Auth Skill

Implements secure OAuth login sessions for Next.js apps with SQLite.

9|2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/aussiegingersnap/cursor-skills --skill lucia-auth-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Lucia Auth Skill
Source: https://github.com/aussiegingersnap/cursor-skills/tree/main/skills/auth-lucia
Command: npx skills add https://github.com/aussiegingersnap/cursor-skills --skill lucia-auth-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Minimal, secure authentication for Next.js App Router using Oslo (crypto)/cookies, Arctic OAuth, and Drizzle ORM + SQLite, avoiding Auth.js/NextAuth bloat while enabling robust user sessions.

Core Features & Use Cases

  • Minimal dependencies with strict TypeScript types and a DB-backed session model.
  • OAuth with Arctic providers (Google and Apple) using PKCE and state verification.
  • Session management via httpOnly cookies and hashed tokens stored in SQLite with Drizzle ORM.
  • Use case: add login to a Next.js app and support sign-in, sign-out, session validation, and account linking across providers.

Quick Start

Start by wiring Google or Apple OAuth in your Next.js app and trigger the login flow to create a user session.

Frequently Asked Questions about Lucia Auth Skill

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

FAQPage Schema
How do I add OAuth authentication to a Next.js App Router project without using NextAuth?

Add OAuth authentication to Next.js App Router by using Arctic for provider flows and Oslo for secure cookies, avoiding NextAuth bloat while enabling robust user sessions.

How does session management work with Drizzle ORM and SQLite in Next.js?

Session management with Drizzle ORM and SQLite stores hashed session tokens in the database and validates them via httpOnly cookies, ensuring secure user authentication in Next.js.

Can I link multiple OAuth accounts like Google and Apple in a Next.js application?

Yes, you can link multiple OAuth accounts across Google and Apple providers using Arctic, handling sign-in, sign-out, and account linking with strict TypeScript typing.

Does this authentication approach enforce PKCE and state validation for Google OAuth?

Yes, the authentication approach enforces PKCE for Google OAuth and validates OAuth state, ensuring secure authorization flows within your Next.js App Router application.

What's the best way to manage minimal dependencies for Next.js user sessions?

Manage minimal dependencies for Next.js user sessions by combining Oslo for cryptography and cookies with Drizzle ORM for SQLite, avoiding heavy authentication libraries while maintaining strict typing.