Hi all,
I’m getting an error with okta-auth-js in my app when using the Firefox browser on windows. It appears to be working on chrome, safari, and edge.
What’s happening is I logout, get redirected properly to my login screen, but when I go to log in again it takes me right through, skipping the authentication step. My guess is the sessions are not properly getting cleared on logout.
I’m using version 5.6.0 from the cdn here.
https://global.oktacdn.com/okta-auth-js/5.6.0/okta-auth-js.min.js
I’m using MFA, prompting for factor every session.
I simplified my code to make it easier to troubleshoot:
var config = {
issuer: `https://${OKTA_ORG_URL}/oauth2/default`,
clientId: OKTA_CLIENT_ID,
redirectUri: REDIRECT_URI,
postLogoutRedirectUri: POST_LOGOUT_URI,
responseMode: 'fragment',
pkce: true,
// Configure TokenManager to use sessionStorage instead of localStorage
// I also tried removing this option with no change
tokenManager: {
storage: 'sessionStorage'
},
restoreOriginalUri: async (oktaAuth, originalUri) => {
window.location.href = HOME_URI;
}
};
var authClient = new OktaAuth(config);
if (authClient.isLoginRedirect()) {
try {
await authClient.handleLoginRedirect();
} catch (e) {
}
} else if (!await authClient.isAuthenticated()) {
// is not authenticated
} else {
// User is authenticated
}
authClient.signInWithRedirect();
Thank you for any help!