You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are testing the Asgardeo React Native sample application (https://github.com/asgardeo/asgardeo-react-native-oidc-sdk/tree/main/sample). But when we use the option "validateIDToken": true (default option) there is a problem inside the method validateIdToken in /src/helpers/authentication-helper.ts
We are testing the Asgardeo React Native sample application (https://github.com/asgardeo/asgardeo-react-native-oidc-sdk/tree/main/sample). But when we use the option "validateIDToken": true (default option) there is a problem inside the method validateIdToken in /src/helpers/authentication-helper.ts
When is executed the following code fragment:
return this._cryptoHelper
.getJWKForTheIdToken(idToken.split(".")[ 0 ], parsedResponse.keys)
.then(async (jwk: any) => {
return this._cryptoHelper
.isValidIdToken(
idToken,
jwk,
(await this._config()).clientID,
issuer,
this._cryptoHelper.decodeIDToken(idToken).sub,
(await this._config()).clockTolerance
)
The react native application doesn't respond.
We've tried the following workaround (remove the async declarative from the .getJWKForTheIdToken call) and worked.
const jwk = this._cryptoHelper.getJWKForTheIdToken(idToken.split(".")[ 0 ], parsedResponse.keys);
return this._cryptoHelper
.isValidIdToken(
idToken,
jwk,
(await this._config()).clientID,
issuer,
this._cryptoHelper.decodeIDToken(idToken).sub,
(await this._config()).clockTolerance
)
As additional information, for the asgardeo-react-native sdk the function getJWKForTheIdToken invokes the public parseJwk method (https://github.com/asgardeo/asgardeo-react-native-oidc-sdk/blob/main/lib/src/crypto-utils.ts)
The text was updated successfully, but these errors were encountered: