Giter Site home page Giter Site logo

nextjs-auth0's Introduction

This is a simple project demonstrating the use of Auth0 with Next.JS. It's primarily designed for testing and understanding the integration of these two powerful tools. This project helps in exploring how to handle user authentication in a Next.js application using Auth0. We've chosen to use the traditional pages directory of Next.JS as the newer app directory is currently not supported.

The core features of this sample project include user sign-in, sign-up, sign-out, as well as sign-in using third-party providers.

Requirements

These are the requirements needed to run the project:

  • Node 18 LTS
  • Next.JS 12
  • Auth0 account

Features

Here are the main features you can explore with this sample:

  • Users can sign in using email and password
  • Users can sign up for a new account
  • Users can sign in using third-party authentication providers
  • Users can sign out

Stack

The main technologies used in this project are:

  • Next.js: Next.js is a popular React framework for building server-side rendered (SSR) and statically generated web applications.

  • Auth0: Auth0 is a flexible, drop-in solution to add authentication and authorization services to your applications. It provides a universal authentication & authorization platform for web, mobile, and legacy applications.

Running Application Locally

Follow these steps to run the application locally.

1. Clone the Project Locally

git clone https://github.com/your-github-username/auth0-nextjs-sample.git

2. Set Up Environment

  1. Copy the .env.example file and rename it to .env.local
  2. Populate the .env.local with the required Auth0 secrets. You will need to create an Auth0 application to get these credentials. If you are unsure of how to do this, follow the Auth0 Application Setup Guide.

3. Install Dependencies

Navigate to your project directory and run the following command to install the necessary dependencies:

yarn install

4. Run Project

Finally, you can run the project using this command:

yarn dev

The application should now be running at http://localhost:3000.

Note

This project uses the traditional pages directory structure of Next.JS and not the newer app directory as the latter is currently not supported with this particular setup.

Enjoy exploring Auth0 with Next.JS!

nextjs-auth0's People

Contributors

mbeps avatar

Stargazers

 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.