# Trying to mimic an IDP flow using a non SAML or OpenID connect compliant

**URL:** <https://devforum.okta.com/t/trying-to-mimic-an-idp-flow-using-a-non-saml-or-openid-connect-compliant/7647>\
**Category:** Questions\
**Tags:** widget\
**Created:** [January 14, 2020, 8:24pm UTC](https://devforum.okta.com/t/trying-to-mimic-an-idp-flow-using-a-non-saml-or-openid-connect-compliant/7647 "2020-01-14T20:24:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vnaves](https://avatars.discourse-cdn.com/v4/letter/v/cab0a1/32.png) [@vnaves](https://devforum.okta.com/u/vnaves)\
**Post date:** [January 14, 2020, 8:24pm UTC](https://devforum.okta.com/t/trying-to-mimic-an-idp-flow-using-a-non-saml-or-openid-connect-compliant/7647/1 "2020-01-14T20:24:34Z")

</div>

Hello, we have a legacy login which we will eventually fully replace with okta user management.

Meanwhile we created an API so that the UI will display the correct form for the user to login.

On the js form I can pre-set the username, but the widget is initialized when the angular 1.x controller.  
In other words, I can’t set the username on the widget on initializing, only after an action has been performed on the page.

Is there a way for me to do so on the Widget?

I’ve tried document.findElement().value = username, but the widget form is not happy with that

---

<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 23, 2024, 7:57pm UTC](https://devforum.okta.com/t/trying-to-mimic-an-idp-flow-using-a-non-saml-or-openid-connect-compliant/7647/2 "2024-01-23T19:57:06Z")

</div>


