How to handle grid and refresh token requests?

have an SfGrid component in my page with an odatav4 data source. My odata api uses jwt authentication, so I am using an http interceptor to intercept each call to the server, check whether the current token has expired, and if so, send a refresh request containing the refresh token. The problem is, the request from the grid still uses the old token, which causes a 401 error and shows an empty grid. I tried calling StateHasChanged after receiving the new token but it doesn't solve the issue. Any ideas as to what can I do?


1 Reply

JP Jeevakanth Palaniappan Syncfusion Team July 19, 2021 03:12 PM UTC

Hi Michael, 
 
Greetings from Syncfusion support. 
 
We have checked your query and we suggest you to refer the below documentation links regarding the httpclient configuration, setting the tokens and authentication. 
 
 
If you are still facing any difficulties then kindly get back to us with the problem you are facing. 
 
Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon