AAD_LOGIN_SUCCESS event is triggered twice on login
Library versions
-
react-aad-msal: 2.3.5 -
msal: 1.3.2
Describe the bug On login, react-aad-msal library sends AAD_LOGIN_SUCCESS event twice in certain situations. This is not specific to login success event. I see multiple events for AAD_ACQUIRED_ID_TOKEN_SUCCESS as well.
I noticed there is a missing await keyword for processLogin() which may or may not be contributing to the issue? https://github.com/syncweek-react-aad/react-aad/blob/a7205ef20c6f9dafff94afbe276fa8fba46b9ef0/packages/react-aad-msal/src/MsalAuthProvider.ts#L314
Expected behavior AAD_LOGIN_SUCCESS should be triggered only once
Desktop (please complete the following information):
- OS: macOS
- Browser chrome
- Version 84.0.4147.105
Experiencing the same @nairmanu
Got same behaviour with LoginType.Redirect scenario:

We get the same event sequence reported by @roxkisrover.