Otherwise we call this function and make a request to our server with the token and confirm that the user is in our DB
export const handleResponseMicrosoft = (err, data: { accessToken: string }) => {
Store.dispatch(toggleLoadingGoogleMicrosoft(true));
if (!err) {
// If err is falsy we make the resquest to the server
// and if the response is OK we set the required states to give the user access to the page
} else {
handleFailure(err);
}
};
When i try to login the popup from MS start looping and the page make an infinity number of request to openid-configuration.
Here is the button with a child component just to have a custom style and icon
This is the callBack
Ifi the user close the popup we handle that like this (we are using redux and the Store.dispatch is needed to call any action)
Otherwise we call this function and make a request to our server with the token and confirm that the user is in our DB
Video evidence of the bug Infinity requests
https://user-images.githubusercontent.com/6945968/147596207-fe825758-efd5-4067-b3a8-718a6b2d5048.mp4
Infinity popup
https://user-images.githubusercontent.com/6945968/147596221-a1cf3f0e-a726-4d81-a4df-2efb1bc01d9a.mp4
dependencies