# Selfservice factor cusomization based on user policy in classic engine

**URL:** <https://devforum.okta.com/t/selfservice-factor-cusomization-based-on-user-policy-in-classic-engine/22650>\
**Category:** Questions\
**Created:** [December 1, 2022, 11:45am UTC](https://devforum.okta.com/t/selfservice-factor-cusomization-based-on-user-policy-in-classic-engine/22650 "2022-12-01T11:45:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philipnoblem](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@philipnoblem](https://devforum.okta.com/u/philipnoblem)\
**Post date:** [December 1, 2022, 11:45am UTC](https://devforum.okta.com/t/selfservice-factor-cusomization-based-on-user-policy-in-classic-engine/22650/1 "2022-12-01T11:45:45Z")

</div>

Hello, We have a new requirement where end users should only view the applicable factors assigned in the policy after clicking on forgot password. Currently its showing all the factors assigned in all the policies. We are using Okta classic engine. Has anyone done this before by changing sign in page code or by some other way?

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [December 2, 2022, 6:35am UTC](https://devforum.okta.com/t/selfservice-factor-cusomization-based-on-user-policy-in-classic-engine/22650/2 "2022-12-02T06:35:33Z")

</div>

Hello,

With Okta classic the recover factors I believe will be a union of all the allowed factors (sms/email/voice) for all the polices that have the group `everyone` assigned too it and allows password recovery.

If you are unable to remove the everyone group from all but one policy another option would be to use the widget [afterRender()](https://github.com/okta/okta-signin-widget#afterrender) callback.

This assumes you are working with a self hosted widget or have a custom domain URL setup for your Okta Org. In `afterRender()` you would want to verify that the controller is `forgot-password` and then hide/remove the element.

```auto
oktaSignIn.on('afterRender', function (context) {
    if (context.controller === 'forgot-password') {
        document.getElementsByClassName('button button-primary button-wide sms-button link-button')[0].remove();
    }
});

```

---

<div class="post-metadata">

**Author:** ![philipnoblem](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@philipnoblem](https://devforum.okta.com/u/philipnoblem)\
**Post date:** [December 2, 2022, 1:50pm UTC](https://devforum.okta.com/t/selfservice-factor-cusomization-based-on-user-policy-in-classic-engine/22650/3 "2022-12-02T13:50:12Z")

</div>

Hi Eric, Thanks for the reply. Before hiding the factors, Is it possible to get the User details which the end user enters in his forgot password page to check the factors he is part of?

Regards,  
PHilip Noble

---

<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:** [February 12, 2024, 10:26pm UTC](https://devforum.okta.com/t/selfservice-factor-cusomization-based-on-user-policy-in-classic-engine/22650/4 "2024-02-12T22:26:21Z")

</div>


