<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00008QlTURSA3Okta Classic EngineMulti-Factor AuthenticationAnswered2020-05-13T16:03:19.000Z2020-05-06T15:31:14.000Z2020-05-13T16:03:19.000Z

SASIK.16488 (Customer) asked a question.

OKTA Sign-in widget for okta-angular 2.0+

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;

}

);

}

 

 

 

/help/servlet/rtaImage?refid=0EM1Y0000012Ns4

 

/help/servlet/rtaImage?refid=0EM1Y0000012NsE

/help/servlet/rtaImage?refid=0EM1Y0000012Nt2


  • 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.

    Expand Post
This question is closed.
Loading
OKTA Sign-in widget for okta-angular 2.0+