This is a simple web application built using React that demonstrates the integration of Azure B2C for login and logout functionality.
- Introduction
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Deployment
- Contributing
- License
The Azure B2C Test Application is a React-based web application that allows users to test the login and logout functionality of an Azure B2C tenant. This application can be used as a starting point for developers who want to integrate Azure B2C into their own web applications.
- Login and logout functionality using Azure B2C
- Responsive design with a clean and simple user interface
- Customizable Azure B2C configuration
- Node.js and npm (Node Package Manager) installed on your system
- An Azure B2C tenant with a configured sign-in policy
- Clone the repository:
git clone https://github.com/fdicarlo/azure-b2c-test.git
- Navigate to the project directory:
cd azure-b2c-test
- Install the required dependencies:
npm install
- Open the
src/App.js
file and replace the following placeholders with your actual Azure B2C configuration:
const msalConfig = {
auth: {
clientId: 'YOUR_CLIENT_ID',
authority: 'https://YOUR_TENANT_NAME.b2clogin.com/YOUR_TENANT_NAME.onmicrosoft.com/YOUR_SIGN_IN_POLICY',
redirectUri: 'http://localhost:3000',
},
};
- If you want to use a custom logo, replace the
logo.png
file in thesrc/assets
folder with your own logo image.
- Start the development server:
npm start
- Open your web browser and navigate to
http://localhost:3000
. - Click the "Login" button to initiate the Azure B2C login flow.
- After successful login, the button should change to "Logout".
- Click the "Logout" button to sign out of the application.
To deploy the application, you can follow these steps:
- Build the production-ready version of the application:
npm run build
- Deploy the contents of the
build
folder to your preferred hosting platform (e.g., GitHub Pages, Netlify, or a web server).
If you find any issues or have suggestions for improvements, feel free to open a new issue or submit a pull request.
This project is licensed under the MIT License.