Closed samirpdl closed 2 months ago
The React-SDK does not have forced token refresh, which is available in the JS SDK (https://github.com/kinde-oss/kinde-auth-pkce-js/blob/main/src/createKindeClient.ts#L213). This is causing issues related to another piece of code available in the JS SDK(https://github.com/kinde-oss/kinde-auth-pkce-js/blob/main/src/utils/isJWTActive/isJWTActive.ts#L6). The addition of LEEWAY doesn't immediately refresh the token; it waits for 60 seconds before refreshing. This causes issues when the token has just expired and there is an API request in progress that doesn't refresh. This can be resolved in two ways: Remove LEEWAY from the JS SDK or add a forceRefresh option to the react-sdk.
https://github.com/kinde-oss/kinde-auth-react
4.0.2
macOS
ALL
No response
I am also facing a similar issue and hope someone can help resolve it. Thanks
Sent a PR : https://github.com/kinde-oss/kinde-auth-pkce-js/pull/77
PR all merged and released version 4.0.4
Prerequisites
Describe the issue
The React-SDK does not have forced token refresh, which is available in the JS SDK (https://github.com/kinde-oss/kinde-auth-pkce-js/blob/main/src/createKindeClient.ts#L213). This is causing issues related to another piece of code available in the JS SDK(https://github.com/kinde-oss/kinde-auth-pkce-js/blob/main/src/utils/isJWTActive/isJWTActive.ts#L6). The addition of LEEWAY doesn't immediately refresh the token; it waits for 60 seconds before refreshing. This causes issues when the token has just expired and there is an API request in progress that doesn't refresh. This can be resolved in two ways: Remove LEEWAY from the JS SDK or add a forceRefresh option to the react-sdk.
Library URL
https://github.com/kinde-oss/kinde-auth-react
Library version
4.0.2
Operating system(s)
macOS
Operating system version(s)
ALL
Further environment details
No response
Reproducible test case URL
No response
Additional information
No response