GithubHelp home page GithubHelp logo

next-auth-app's Introduction

Next-Auth Login Authentication - 101

This project demonstrates a basic login authentication example using Next.js and the Next-Auth library. The project provides a simple login system where users can log in with a hardcoded username/password or through their GitHub accounts.

Screenshots

image image image image

Getting Started

  1. Clone the project to your computer or download and extract the ZIP file.
  2. Open the terminal and navigate to the project folder:

cd next-auth-app

  1. Install the necessary dependencies by running the following command:

npm install

  1. For Github OAuth settings :
  • Go to the GitHub Developer Settings page.
  • Create a new OAuth application: . Provide an appropriate "Application name" (e.g., Next-Auth Login Tutorial). . In the "Homepage URL" field, enter http://localhost:3000. . In the "Authorization callback URL" field, enter 'http://localhost:3000/api/auth/callback/github'.
  • Copy the "Client ID" and "Client Secret" values of the created application.
  1. Create a file named .env.local in the project root directory and add the following content:

GITHUB_CLIENT_ID=<GitHub Client ID> GITHUB_CLIENT_SECRET=<GitHub Client Secret>

Replace and with the corresponding values from your GitHub OAuth application.

  1. Start the project by running the following command:

npm run dev The project should now be running at http://localhost:3000. Open your browser and navigate to this address to see the project.

next-auth-app's People

Contributors

gurkanyigitgr avatar

Watchers

 avatar

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.