authjs-skills

Set up Auth.js v5 authentication in Next.js apps with Google OAuth.

Updated Jun 16, 2017
One-click install
npx skills add https://github.com/vuanhtu1993/vuanhtu1993.github.io --skill authjs-skills-vuanhtu1993
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authjs-skills
Source: https://github.com/vuanhtu1993/vuanhtu1993.github.io/tree/main/.gemini/skills/authjs-skills
Command: npx skills add https://github.com/vuanhtu1993/vuanhtu1993.github.io --skill authjs-skills-vuanhtu1993

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to integrating Auth.js v5 authentication into Next.js apps, enabling secure sign-in flows with Google OAuth, credentials provider, and proper environment configuration to power server-side authentication.

Core Features & Use Cases

  • Google OAuth: Enable social sign-in using Google accounts with secure token handling.
  • Credentials Provider: Implement username/password authentication with server-side validation.
  • Environment & API Integration: Centralized config for secrets and seamless API calls across app routes and middleware.

Quick Start

Install dependencies, configure environment variables, create the auth.ts setup, and wire up the API route and middleware to enable authentication quickly.

Frequently Asked Questions about authjs-skills

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

FAQPage Schema
How do I set up Auth.js v5 authentication in a Next.js App Router project?

To set up Auth.js v5 authentication in Next.js, install NextAuth, configure environment variables like AUTH_SECRET, create an auth.ts file, and wire up API routes and middleware to enable secure server-side sign-in flows.

Can I use Google OAuth and credentials provider together for Next.js sign-in?

Yes, Next.js sign-in can use both Google OAuth and a credentials provider together, allowing social sign-in with secure token handling alongside username and password validation managed on the server.

What environment variables do I need for NextAuth v5 with Google OAuth?

For NextAuth v5 with Google OAuth, you need the AUTH_SECRET, AUTH_GOOGLE_ID, and AUTH_GOOGLE_SECRET environment variables to properly configure secure token handling and API integration.

Does Auth.js v5 support server components and middleware for Next.js authentication?

Yes, Auth.js v5 supports Next.js authentication across server components and middleware, providing centralized configuration for secrets and enabling seamless API calls throughout application routes.

Related Skills