New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

init-auth

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

init-auth

CLI to add NextAuth boilerplate to Next.js projects

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

NextAuth setup

A CLI tool to quickly set up NextAuth.js boilerplate in a Next.js project.
It generates all the necessary files, adds dependencies to package.json, and sets up environment variables.

Features

  • Generates src/auth folder with:
    • auth.config.ts – NextAuth configuration
    • auth.ts – NextAuth instance with credentials provider
    • get-session.ts – Helper to get session on the server
    • actions.ts – Sign-in and sign-out server actions
  • Creates src/middleware.ts for protected routes
  • Adds "next-auth": "^5.0.0-beta.5" to package.json (without installing)
  • Creates/updates .env.local with:
    • NEXTAUTH_SECRET (auto-generated)
    • NEXT_PUBLIC_SESSION_AGE (default 900 seconds)

Installation

You don’t need to install globally. Use npx:

npx init-auth

Keywords

nextauth

FAQs

Package last updated on 15 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts