Hi,
I’m using the Okta Widget on my browser and I am trying to implement MFA. Before when I was just using the password to confirm my users without MFA the below worked just fine.
const oktaSignIn = new OktaSignIn({
baseUrl: [baseURL],
clientId: [clientId],
authParams: {
issuer: [issuer]
},
features: {
rememberMe: false
}
});
const authClient = new OktaAuth({
issuer: [issuer]
})
oktaSignIn.renderEl({
el: '#okta-widget-container'
}, function success(res) {
if (res.status === 'SUCCESS') {
authClient.session.get().then(e => {
//HERE IS WHERE I GOT ALL THE INFORMATION I NEEDED TO USE MY CUSTOM LOGIC//
console.log("response", e);
}).catch(function (err) {
alert("Okta Login Error. Please try again or try our standard login method.");
});
} else {
alert("Okta Login Error. Please try again or try our standard login method. \nMessage: " + err);
}
})
Now, however, since I’ve implemented my MFA this logic is ignored by the Okta widget and is not triggered. I believe I have my MFA configured correctly as I can go all the way to the end of the MFA process and get a “status: success” response from the “api/v1/authn/factors/[hash]/verify?rememberDevice=false” endpoint.
All I need to do is have a way to have a callback function or built in method to call whenever “/verify” is called, so then I can parse through the response and continue with my custom logic.
Any help is appreciated!