# How to enable MFA in Single Sign In Widget- Angular 1.x

**URL:** <https://devforum.okta.com/t/how-to-enable-mfa-in-single-sign-in-widget-angular-1-x/336>\
**Category:** Questions\
**Tags:** widget, mfa, angular\
**Created:** [August 14, 2017, 6:39pm UTC](https://devforum.okta.com/t/how-to-enable-mfa-in-single-sign-in-widget-angular-1-x/336 "2017-08-14T18:39:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohitgupta86](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@mohitgupta86](https://devforum.okta.com/u/mohitgupta86)\
**Post date:** [August 14, 2017, 6:39pm UTC](https://devforum.okta.com/t/how-to-enable-mfa-in-single-sign-in-widget-angular-1-x/336/1 "2017-08-14T18:39:29Z")

</div>

I have the below working code, but my company uses MFA through VPN token(Android app), but the below code does not take me to the Second factor authentication screen. I am using Angular 1.

Localhost below is my website’s homepage which I wish to redirect the user to, post second factor authentication. But currently, it signs in directly after 1st Ldap authentication screen:

My sample code currently looks like this :

```
var config = {
    baseUrl: 'https://xyz.okta.com',       
    features: {
        autoPush: true,
        multiOptionalFactorEnroll: true
    }
}
var signIn = new OktaSignIn(config);
 var redirectURL = 'http://localhost:63229';   
  signIn.renderEl(
      { el: '#output' },
        function (res) {
         console.log(res);
         if (res.status === 'SUCCESS') { 
             res.session.setCookieAndRedirect(redirectURL);
         }
         } ); 

```

Please advise how can I implement Second factor Authentication here.

---

<div class="post-metadata">

**Author:** ![mohitgupta86](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@mohitgupta86](https://devforum.okta.com/u/mohitgupta86)\
**Post date:** [August 15, 2017, 10:00am UTC](https://devforum.okta.com/t/how-to-enable-mfa-in-single-sign-in-widget-angular-1-x/336/2 "2017-08-15T10:00:23Z")

</div>

Any leads on this?

There is not much documentation available for Multi Factor Authentication using Single Sign-In widget.

---

<div class="post-metadata">

**Author:** ![mcguinness](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mcguinness/32/56_2.png) [@mcguinness](https://devforum.okta.com/u/mcguinness)\
**Post date:** [August 16, 2017, 5:18am UTC](https://devforum.okta.com/t/how-to-enable-mfa-in-single-sign-in-widget-angular-1-x/336/3 "2017-08-16T05:18:09Z")

</div>

MFA challenges are determined by the Okta Sign-On Policy requirements for your organization. It is common for policies use network conditions (e.g. on-prem or off-prem) to challenge for MFA. If you are not being challenged for MFA then you are matching a policy rule which skips MFA. I would recommend checking your network zones to make sure you are not matching an on-prem zone which bypasses MFA.

---

<div class="post-metadata">

**Author:** ![mohitgupta86](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@mohitgupta86](https://devforum.okta.com/u/mohitgupta86)\
**Post date:** [August 16, 2017, 7:23am UTC](https://devforum.okta.com/t/how-to-enable-mfa-in-single-sign-in-widget-angular-1-x/336/4 "2017-08-16T07:23:25Z")

</div>

@mcguinness

I have earlier implemented the solution using Angular + API (.Net) where the OKTA response hits the recipientURL directly on the API on successful authentication using the same environment(same OKTA org).

In that case, it asked for Second factor authentication without any additional configuration.

I could not go forward with that implementation as I found no way to move to the Angular App from the WebAPI with user info and establish connection with (front end)Angular.

Not sure why it is not asking for Second Factor Authentication when I am using Single-Sign-In widget.

Thanks

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 12, 2024, 7:15pm UTC](https://devforum.okta.com/t/how-to-enable-mfa-in-single-sign-in-widget-angular-1-x/336/5 "2024-01-12T19:15:40Z")

</div>


