
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
nextauth-cli
Advanced tools
NextAuth CLI is a command-line interface tool designed to simplify the process of creating base templates and initializing NextAuth.js base templates for users.
To install the NextAuth CLI, you can use npm:
npm i -g nextauth-cli@latest
The CLI provides a set of commands to streamline the setup process for NextAuth.js, Sveltekit and Solid | Solid-start projects. Below are the available commands for each project type:
nextauth --router <router-type> --provider <provider> --adapter <adapter> --secret --env --ts
svelteauth --provider <provider> --adapter <adapter> --dynamic --secret --env --ts
solidauth --provider <provider> --adapter <adapter> --secret --env --ts
Efficiently set up your authentication flow with NextAuth.js, Sveltekit, or Solid | Solid-start projects using the provided CLI commands:
nextauth --router <router-type> --provider <provider> --adapter <adapter> --secret --env --ts
Creates a new project with the the specified Next.js base template. Options for the following flags are given below.
--env: Specifies if an additional .env.example file is to be generated which includes all the process.env variables that are to be used. Default value is false.
--ts: Specifies if the project is typescript configured. Default value is false.
--secret: Specifies if NextAuth options should include a secret field.
--router <router-type>: Specifies the type of Next.js router to be used. Available options:
app ✅pages ✅src ⚒️--adapter <adapter>: Specifies the adapter used for the project. Available options:
dgraph✅drizzle✅dynamodb✅fauna✅firebase✅kysely✅mikro-orm⚒️mongodb✅neo4j✅pouchdb⚒️prisma ✅sequalize✅supabase✅typeorm✅upstash-redis✅xata⚒️--provider <provider>: Specifies the authentication provider(s) to be used for the project. Available options:
Apple ✅Atlassian ✅Auth0 ✅Authentik ✅AzureAD ✅AzureB2C ✅Battlenet ✅Box ✅BoxyHQSAML ✅Bungie ✅Cognito ✅Coinbase ✅Credentials ✅Discord ✅Dropbox ✅DuendeIDS6 ✅Email ✅Eveonline ✅Facebook ✅Faceit ✅FortyTwoSchool ✅Foursquare ✅Freshbooks ✅Fusionauth ✅GitHub ✅Gitlab ✅Google ✅Hubspot ✅Instagram ✅Kakao ✅Keycloak ✅Line ✅LinkedIn ✅Mailchimp ✅Mailru ✅Medium ✅Naver ✅Netlify ✅Okta ✅Onelogin ✅Osso ✅Osu ✅Passage ✅Patreon ✅Pinterest ✅Pipedrive ✅Reddit ✅Salesforce ✅Slack ✅Spotify ✅Strava ✅Todoist ✅Trakt ✅Twitch ✅Twitter ✅UnitedEffects ✅Vk ✅Wikimedia ✅Wordpress ✅WorkOS ✅Yandex ✅Zitadel ✅Zoho ✅Zoom ✅The CLI ensures a seamless setup process by offering a prompt-based support to configure your specific project requirements. This interactive approach allows you to customize the authentication flow according to your needs effortlessly.
Nextjs
nextauth --router app --provider Google --adapter mongodb --env --ts --secret
In this example:
--router app: Specifies that the project will use the Next.js router with the "app" type.--provider Google: Specifies that Google authentication will be used.--adapter mongodb: Specifies that the project will use MongoDB as the database adapter.--env: Indicates that an additional .env.example file will be generated.--ts: Specifies that the project will be configured for TypeScript.--secret: Indicates that NextAuth options will include a secret field.Sveltekit
svelteauth --provider Google --adapter mongodb --env --ts --secret --dynamic
In this example:
--provider Google: Specifies that Google authentication will be used.--adapter mongodb: Specifies that the project will use MongoDB as the database adapter.--env: Indicates that an additional .env.example file will be generated.--ts: Specifies that the project will be configured for TypeScript.--secret: Indicates that NextAuth options will include a secret field.--dynamic: Specifies that the module provides access to runtime environment variables, as defined by the platform you're running on.Solid
solidauth --provider Google --adapter prisma --env --ts --secret --db mongodb
In this example:
--provider Google: Specifies that Google authentication will be used.--adapter prisma: Specifies that the project will use Prisma as the database adapter.--db mongodb: Specifies that Prisma adapter uses MongoDb as it's database.--env: Indicates that an additional .env.example file will be generated.--ts: Specifies that the project will be configured for TypeScript.--secret: Indicates that NextAuth options will include a secret field.Feel free to modify the options and values based on your specific use case.
We welcome contributions from the community! If you find any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
FAQs
A nextauth cli to setup a basic application Setup running
We found that nextauth-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.