Skip to content

A simple web application to test the login and logout functionality of Azure B2C

License

Notifications You must be signed in to change notification settings

fdicarlo/azure-b2c-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure B2C Test Application

This is a simple web application built using React that demonstrates the integration of Azure B2C for login and logout functionality.

Table of Contents

  1. Introduction
  2. Features
  3. Prerequisites
  4. Installation
  5. Configuration
  6. Usage
  7. Deployment
  8. Contributing
  9. License

Introduction

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.

Features

  • Login and logout functionality using Azure B2C
  • Responsive design with a clean and simple user interface
  • Customizable Azure B2C configuration

Prerequisites

  • Node.js and npm (Node Package Manager) installed on your system
  • An Azure B2C tenant with a configured sign-in policy

Installation

  1. Clone the repository:
git clone https://github.com/fdicarlo/azure-b2c-test.git
  1. Navigate to the project directory:
cd azure-b2c-test
  1. Install the required dependencies:
npm install

Configuration

  1. 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',
  },
};
  1. If you want to use a custom logo, replace the logo.png file in the src/assets folder with your own logo image.

Usage

  1. Start the development server:
npm start
  1. Open your web browser and navigate to http://localhost:3000.
  2. Click the "Login" button to initiate the Azure B2C login flow.
  3. After successful login, the button should change to "Logout".
  4. Click the "Logout" button to sign out of the application.

Deployment

To deploy the application, you can follow these steps:

  1. Build the production-ready version of the application:
npm run build
  1. Deploy the contents of the build folder to your preferred hosting platform (e.g., GitHub Pages, Netlify, or a web server).

Contributing

If you find any issues or have suggestions for improvements, feel free to open a new issue or submit a pull request.

License

This project is licensed under the MIT License.

About

A simple web application to test the login and logout functionality of Azure B2C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published