Open nandeeshwar-p opened 1 month ago
hi @nandeeshwar-p ,
thank you for your issue. DO you have a sample of your configuration?
To refresh token, you should avec scope : access_offline or use silent signin.
hi @nandeeshwar-p you manage to make it works?
@guillaume-chervet thanks for the response... How do we use silent signin, could you please share the example link or a code snippet....
Hi @nandeeshwar-p , did you tried the demo? https://github.com/AxaFrance/oidc-client/blob/main/examples%2Freact-oidc-demo%2Fsrc%2FMultiAuth.tsx
It contains many example. Which framework are you using?
Code snippet related to my implementation
With this in palce, a call is made to fetch token with the code as null,and eventually it fails
I am using latest version of the package @axa-fr/react-oidc.
My requirement is to refresh access and I'd tokens, before the session expires if the user is actively using the application.
So, as pert of oidc configuration I have added refresh_time_before_tokens_expiration_in_second:300, and token_automatic_renew_mode:TokenAutomaticRenewMode.AutomaticBeforeTokensExpiration, even then the token renew doesn't happen silently, instead after session expiry, "Session lost" component is rendered.
I tried with service worker and without service worker, either way it didn't help.
Could you please let me know how to renew tokens(with/out sevice worker) without disturbing user activity