-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Token multiple call #1393
Comments
hi @YaoHure , Did you tried to set token_renew_mode: TokenRenewMode.access_token_invalid, Do you have a sample of your tokens ? |
When i try to put the token_renew_mode: TokenRenewMode.access_token_invalid it worse the token is call almost every 5 secs. Here is an sample of tokens and scope that i send :
|
Do you know the lifetime of your access_token and refresh_token ? @YaoHure |
You can also set the default behavior to refresh only when needed https://github.com/AxaFrance/oidc-client/blob/main/examples%2Freact-oidc-demo%2Fsrc%2Fconfigurations.ts#L20 It require you to use fetch from the library to ensure a correct behavior. |
@guillaume-chervet access_token : 120sec and refresh_token : 30 days |
I use to put this : token_automatic_renew_mode: TokenAutomaticRenewMode.AutomaticOnlyWhenFetchExecuted, but i don't why like 30min after I received any more tokens ... or do i need to put a new config inside of the openId ? |
hi @YaoHure ,
or to use this method before an http call :
|
Hi @guillaume-chervet
cause i don't understand what should i put instead of props.configurationName . |
configurationName is not mandatory @YaoHure , default is "default". it is used when you have multiple authentication with multiple configuration. |
I will close this issue i found the solution |
Issue and Steps to Reproduce
After logging into the application when I see in the log, there are a lot of calls to the token. Like about very 30sec or less ...
Versions
Screenshots
Config
client_id: 'my_clientid', redirect_uri: window.location.origin + '/oidc-callback', silent_redirect_uri: window.location.origin + '/silent-oidc-callback', scope: 'profile offline_access openid profile_extended + my_scopes', authority: GetConfig('ssoUrl'), service_worker_relative_url: '/OidcServiceWorker.js', service_worker_only: true, demonstrating_proof_of_possession: false, acr_values: 'externalAmrAzureEnable:1', loadUserInfo: true, extras: { acr_values: 'externalAmrAzureEnable:1', },
Using react.js and vite
The text was updated successfully, but these errors were encountered: