I am developing a web application using React for the front end and Spring Boot for the backend, with authentication handled by MSAL4J.
In my application, when the frontend attempts to access a protected API, an MSAL form is presented for Multi-Factor Authentication (MFA). After successful MFA, React needs to call java API endpoint on the backend to obtain an access token for the logged-in user.
Could someone please guide me on the following:
How can React submit the necessary data to the backend API after MFA is completed?
How should the backend API process this request and generate the access token based on the authenticated user?
I understand that using the Client Credentials flow is not appropriate for this scenario.
Therefore, I need to understand the correct approach for handling this interaction between React, MSAL4J, and my Spring Boot backend