This is a Next.js project bootstrapped with create-next-app and uses the Azure AD B2C Provider from NextAuth.js to handle authentication.
The focus of this repository is to demonstrate how to use Authsignal with Azure AD B2C by adding steps to custom policies.
| Resource | URL |
|---|---|
| Live Demo | as-azure-ad-b2c-example.vercel.app |
| Custom Policies | ./policies/ |
| Integration Guide | docs.authsignal.com |
Follow our step-by-step Integration Guide for detailed instructions on integrating Authsignal with Azure AD B2C.
Use the custom policies in this repo as a starting point for your own implementation.
-
Download the Azure AD B2C VS Code extension
Install the Azure AD B2C extension from the VS Code marketplace.
-
Clone the repo
git clone <repo-url> cd azure-ad-b2c-example
-
Copy the example config
cp appsettings.example.json appsettings.json
-
Replace the config
Update
appsettings.jsonwith your Azure AD B2C tenant details and Authsignal configuration. -
Build the policies
Run the B2C Build all policies command from the VS Code extension (press
Ctrl+Shift+PorCmd+Shift+Pand search for "B2C Build all policies"). -
Store your Authsignal Tenant Secret on Azure AD B2C
Your Authsignal tenant secret is stored as a policy key on Azure AD B2C's Identity Experience Framework and referenced by the technical profile with the Id
B2C_1A_AuthsignalSecret.Find the secret key for your tenant in the Authsignal Portal and add it to your Azure AD B2C tenant as a policy key via the Azure Portal.
-
Upload the custom policies
Upload the generated custom policies to your Azure AD B2C tenant via the Azure Portal or using the VS Code extension.