npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nextauth-cli

v0.0.6

Published

A nextauth cli to setup a basic application Setup running

Downloads

21

Readme

NextAuth CLI

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.

Table of Contents

Installation

To install the NextAuth CLI, you can use npm:

npm i -g nextauth-cli@latest

Commands

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

  1. For Nextjs Projects
nextauth --router <router-type> --provider <provider> --adapter <adapter> --secret --env --ts

Svelteauth

  1. For Sveltekit Projects
svelteauth --provider <provider> --adapter <adapter> --dynamic --secret --env --ts

Solidauth

  1. For Solid | Solid-start Projects
solidauth --provider <provider> --adapter <adapter> --secret --env --ts

Usage

Efficiently set up your authentication flow with NextAuth.js, Sveltekit, or Solid | Solid-start projects using the provided CLI commands:

  1. Commands with flags.
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.

Options:

  • --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
  1. Commands with prompts support.

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.

Example

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.

Status

  • ✔️ Partially Fixed: Some progress has been made, but more work is needed.
  • Totally Fixed: All reported issues have been successfully resolved.
  • ⚒️ Build in Progress: Work is currently underway to fix the reported issues.

Contributing

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.

License

This project is licensed under the MIT License.