/descope-azure-b2c-react-sample

React Sample App to show Descope as an OIDC Provider with Azure B2C

Primary LanguageJavaScript

Azure B2C and Descope Banner


Azure AD B2C + Descope React Sample App

This open-source sample app, built with React, demonstrates integration with Azure AD B2C and Descope for authentication. The application showcases the use of Azure AD B2C for user authentication in a React application, leveraging MSAL React hooks.

Before running the app, you'll need to configure Azure AD B2C and Descope as per the instructions provided here.

Table of Contents 📝

  1. Features
  2. Installation
  3. Running the Application
  4. Configuring Azure AD B2C and Descope
  5. Issue Reporting
  6. License

Features ✨

  • Azure AD B2C Integration: Seamless integration with Azure AD B2C for user authentication.
  • Descope Authentication: Leverage Descope as a federated identity provider.
  • React MSAL Usage: Utilization of MSAL React hooks for handling authentication flows.

Installation 💿

Clone the repository:

git clone https://github.com/descope-sample-apps/azure-b2c-react-sample-app.git

Install dependencies:

npm install
# or
yarn install

Configuring Authentication Settings

Open src/authConfig.js and replace the placeholder values with your actual Azure AD B2C settings:

  • clientId: Your Azure AD B2C application client ID.
  • authority: Your Azure AD B2C authority URL.
  • knownAuthorities: Your Azure AD B2C tenant domain.

Running the Application 🚀

To start the application:

npm start
# or
yarn start

Navigate to http://localhost:3000/ in your browser.

Configuring Azure AD B2C and Descope

Ensure you have correctly configured Azure AD B2C and Descope. Follow the detailed guide here for instructions on setting up Azure AD B2C Tenant, registering the application, and configuring Descope as an Identity Provider.

Issue Reporting ⚠️

For any issues or suggestions, please open an issue on GitHub.

License 📜

This project is licensed under the MIT License - see the LICENSE file for details.