react-aad
react-aad copied to clipboard
GetAccessToken add 2 pages to my history and break my navigation
Library versions
- react-aad-msal: 2.3.2
- msal: 1.2.1
- react: 16.8.1
- react-router: 3.0.5
- @types/history: 3.2.2
Describe the bug At each "getAccessToken" call it's add 2 navigations to my history which totally breaks my navigation ( I need 3 clicks on "back" button to come back to the previous page).
I don't really understand what is happening and i didn't find any ideas or solutions on the web. So maybe you can help me. I tried to access the history list to see what is added but i failed.
To Reproduce
Steps to reproduce the behavior:

Desktop:
- OS: windows 10
- Browser : All (Chrome, FireFox, Opera with the lastest version)
Thanks for submitting this. This may be a MSAL issue, but I will try to do some testing to identify root cause. My suspicion is that the iframe which MSAL uses to acquire the token is adding entries to the history.
@NextStar31, are you able to repro this with the sample app? I've tested and don't see additional entries added after calling the getAccessToken() method. Are you able to provide a repository that exhibits the behavior?
HI ! Thank you for your response. I will try to repro with the sample app and see what i do differently. I will provide an small example with the problem
I just saw this issue filed on MSAL, could it be related to what you're seeing? https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/1310
Hi, thx it is exactly my issue. I will post there to add to the post. Thank you