A login module for a micro frontend application based on Web Components
A demo is available at https://ibbus93.github.io/micro-login
The motivation behind this project is to test a personal approach to microfrontends. The goals of the login are to authenticate the user and to return a uuid and an authentication token to its container.
This module is part of the larger personal demo project about React microfrontends based on Redux. The project could work standalone but it's intended to be loaded at runtime by its container.
Hence, after the project stars, there are two possible behaviours:
- if the project is standalone, then it does nothing notable;
- if the project is loaded by the container, then after the successful login it should return the uuid and the auth token to the container using a callback function received directly by the container.
The login request is submitted to a Postman Mock collection, so every username and password combination is acceptable.
The structure is very light and easy:
/public
contains the index.html to let the project work as standalone;/src
contains the core of the project, in particular:/api
contains the POST request of login;/features
contains the sign-in page showed to perform the login;/store
contains the redux store with the saga effects to make the POST request.
This project is build using React App Rewired,
hence it requires a config-overrides.js
file in order to work.
Other notable technologies used are:
- Clone the repository
yarn install
yarn start