I have a situation trying to retrieve tokens using getWithoutPrompt when the clientId used to set up the OktaAuth is incorrect, token.getWithoutPrompt() is not being resolved nor rejected, it looks like is because of the iframe you use to retrieve the tokens.
Describe the bug
Hello @pawitp @cmatheson @Almad @bdemers @robertjd,
I have a situation trying to retrieve tokens using getWithoutPrompt when the clientId used to set up the OktaAuth is incorrect, token.getWithoutPrompt() is not being resolved nor rejected, it looks like is because of the iframe you use to retrieve the tokens.
For example,
this.authClient = new OktaAuth({ issuer: process.env.REACT_APP_OKTA_TOKEN_ISSUER, clientId: process.env.BAD_OKTA_CLIENT_ID, redirectUri: window.location.origin + "/sign-in/callback", pkce: true, });
this.authClient.token .getWithoutPrompt() .then((res) => console.log('res', res)) .catch((error) => console.log('error', error));
In the code above, the then and catch blocks are never executed.
Reproduction Steps?
SDK Versions
@okta/okta-auth-js 7.3.0
Additional Information?
it seems like is a known issue https://github.com/okta/okta-auth-js/issues/1018