
SASIK.16488 (Customer) asked a question.
Hi
I have followed this link https://developer.okta.com/code/angular/okta_angular_sign-in_widget/ and I can see the sign-in image 1 below, however, I want to enforce the user to select multi-factor once login like image 2, however, it is always going to email authentication like image3, I have enforced the rules in the admin console and reset the multifactor auth, below is my code., am I missing anything?
public static config = {
/*dev configuration*/
baseUrl: 'https://dev-111.oktapreview.com',
logo: '/assets/images/banner.png',
issuer: 'https://dev-111.oktapreview.com/oauth2/default',
redirectUri: 'http://localhost:8380/login',
clientId: 'fdksjfnkdsnkfnksdn',
authParams: {
responseType: 'code',
display: 'page',
scopes: ['openid', 'email', 'profile'],
},
language: 'en',
i18n: {
en: {
'primaryauth.title': 'Enter your email and password to login',
'primaryauth.submit': 'Login',
'primaryauth.username.placeholder': 'Enter your email address',
'primaryauth.username.tooltip': ' ',
'primaryauth.password.tooltip': ' ',
'error.username.required': 'Please enter your email',
'error.password.required': 'Please enter a password',
'errors.E0000004': 'Sign in failed. Invalid email address/password provided, or you may not be a registered user of this application. Please check your credentials and try again, or register for an account!',
'password.expired.title': 'Your password has expired',
'error.auth.lockedOut': 'Your account has been locked for 30 minutes, please try later or contact customer service at 1-866-472-6711',
'mfa.sendEmail': 'Send verification email',
'password.oldPassword.placeholder': 'Old/Temporary password'
}
},
features: {
registration: false, // Enable self-service registration flow
rememberMe: true, // Setting to false will remove the checkbox to save username
multiOptionalFactorEnroll: true, // Allow users to enroll in multiple optional factors before finishing the authentication flow.
router: true, // Leave this set to true for the API demo
},
helpLinks: {
forgotPassword: './forgotpassword',
help: 'https://dev111/mfa/MFA_FAQ.pdf',
}
};
<div id="okta-signin-container"></div>
this.widget.renderEl({
el: '*okta-signin-container'
}, (res) => {
console.log('res.status is ', res.status);
if (res.status === 'SUCCESS') {
this.signIn.loginRedirect('/', { sessionToken: res.session.token });
}
},
(err) => {
console.log('error rendering widget ', err);
throw err;
}
);
}

Thank you for reaching out to us Sasi!
Checking the provided screenshots, the issue seems that it automatically routes the user towards email authentication.
I would recommend opening a case with us, as this would need further troubleshooting and we might also need to engage our dev resources for your current situation.