GithubHelp home page GithubHelp logo

ndom91 / next-auth-example-sign-in-page Goto Github PK

View Code? Open in Web Editor NEW
82.0 2.0 32.0 1.41 MB

Example Auth.js v5 Custom Signin Page

Home Page: https://authjs-custom-page-example.vercel.app

License: MIT License

JavaScript 1.47% CSS 6.59% TypeScript 91.94%
next-auth authjs nextjs tailwindcss

next-auth-example-sign-in-page's Introduction

๐Ÿ” Example Sign-in Page

This is a custom Auth.js v5 sign-in page I'd once used in a side project. I decided to clean it up and open-source it in this template repository as others might find it a useful starting point! This example was created with create-next-app and uses [email protected] and uses [email protected].

Note

The default password for this demo page is password

๐Ÿ“บ Screenshot

Screenshot 1

๐Ÿš€ Getting Started

  1. Install dependencies
pnpm install
  1. Create your own environment variables
cp .env.local.example .env.local
  • AUTH_SECRET (required) - openssl rand -base64 33 or use a generator like npx auth secret
  • AUTH_GITHUB_* (optional) - navigate to GitHub > Settings > Apps and create a new app.
    • For a more detailed walk-through, check out the Auth.js guide
  1. Start dev server
pnpm dev
  1. Open http://localhost:3000 and click "Signin" in the top-left or navigate to the signin page directly (/auth/login).

๐Ÿ” Auth.js

You will find the example sign-in page under /app/auth/login/page.tsx.

This page has both the Credential provider and an example OAuth provider (Github) setup. More information can be found at https://authjs.dev

๐Ÿ“ License

MIT

next-auth-example-sign-in-page's People

Contributors

ndom91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

next-auth-example-sign-in-page's Issues

missing csrf

Hello,
First off thank you for the example.
I cloned your repo and installed all the dependencies. The login page itself is loading however when I click on sign in with GitHub or with credentials nothing happens. The terminal logs out this error:
missing csrf: csrf token was missing during an action sign in.

I appreciate any help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.