react-aad icon indicating copy to clipboard operation
react-aad copied to clipboard

Calling authProvider.getAccessToken() causes AzureAD component re-render

Open terjela opened this issue 5 years ago • 3 comments
trafficstars

- [X ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Use authProvider.getAccessToken() to fetch token, AzureAD component will re-render

Expected/desired behavior

AzureAD should not re-render. This causes the whole application to re-render for each API call, making the application slower and introduces bugs with input focus etc.

OS and Version?

Mac OS/Windows 10

Library versions

  • react-aad-msal: 2.3.5
  • msal: 1.3.1

terjela avatar May 18 '20 13:05 terjela

had to remove this from our code becos of this bug

adomrockie avatar May 22 '20 15:05 adomrockie

had to remove this from our code becos of this bug

I had to make a temporary workaround where I store the token in Redux, and check Redux store before calling getAccessToken().

terjela avatar May 25 '20 11:05 terjela

i am having the same issue

flieks avatar Jun 11 '20 22:06 flieks