[go: up one dir, main page]

Skip to content

Next.js v14 NextAuth.js v5 Beta Azure AD B2C Example with Signin, Signout, and Refresh Token Rotation

License

Notifications You must be signed in to change notification settings

karoldavid/next-auth-azure-ad-b2c-example

Repository files navigation

Next.js with NextAuth.js and Azure AD B2C Example

This repository provides a practical example of integrating Next.js version 14, NextAuth.js version 5 (beta version, soon to be Auth.js), and Azure AD B2C for Single Page Applications with Signin User Flow.

The implementation of Login, Logout, and Refresh Token Rotation features is designed to help other developers get a quick start.

For the NextAuth.js Upgrade Guide (v5) click here.

Getting Started

Configure Azure AD B2C

Follow the instructions to obtain the necessary credentials:

Setup and Run

  1. Clone this repository:
git clone https://github.com/karoldavid/next-auth-azure-ad-b2c-example.git
  1. Install dependencies:
cd next-auth-azure-ad-b2c-example
yarn
  1. Configure your Azure AD B2C settings:

Update the .env.local.example file with your B2C configuration and rename it to .env.local.

  1. Run the application:
npm run dev
  1. Visit http://localhost:3000 in your browser.

Implemented Features

Login

Logout

Refresh Token Rotation

Resources

The following resources were helpful in implementing these features:

License

This project is licensed under the terms of the MIT license. For more details, see the LICENSE file in the repository.

About

Next.js v14 NextAuth.js v5 Beta Azure AD B2C Example with Signin, Signout, and Refresh Token Rotation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published