Open sandyboon opened 2 years ago
@sandyboon Do you experience the same behavior if you call .signOut()
before .stop()
?
Like so:
await authClient.signOut();
authClient.stop();
Also, do you mind providing your OktaAuth
config? (Please scrub sensitive fields)
@jaredperreault-okta Thanks for responding. I just tested it. I do experience the same behavior even if I call signout() before the stop(). The browser I am using is Chrome 97.0.4692.99.
Here is my OAuthConfig -
OAuthConfig = {
OAuthType: "Okta",
// Org URL
issuer: "
It's unclear from the repro steps provided, was the user redirected to Facebook during the initial login? In Step 3, the user is logged out, but it's unclear how they had a session in the first place.
@jaredperreault-okta The user does get redirected to Facebook login page where they put in their credentials. I have updated the repro steps.
I notice your authClient.token.getWithRedirect
call doesn't pass the idp
option (docs). Mind retrying with that option set?
@jaredperreault-okta I am seeing the same behaviour even when I pass the idp
option like so -
authClient.token.getWithRedirect({ idp: "idp-identifier" });
Using @okta/okta-auth-js version 5.10.0. Auth flow - Auth Code with PKCE for SPA.
authClient = new OktaAuth(this.OAuthConfig); authClient.start(); if (authClient.isLoginRedirect()) { authClient.token.parseFromUrl() .then(data => { // Store parsed token in Token Manager authClient.tokenManager.add("idToken", idToken); authClient.tokenManager.add("accessToken", accessToken); }); } else { authClient.tokenManager.get('idToken') .then(idToken => { console.log(idToken); if (idToken) { console.log(
Hi ${idToken.claims.email}!); } else { // You're not logged in, you need a sessionToken authClient.token.getWithRedirect({ responseType: 'id_token' }); } }) }
authClient.stop(); await this.authClient.signOut();