# Can't get Javascript Okta widget to work

**URL:** <https://devforum.okta.com/t/cant-get-javascript-okta-widget-to-work/21439>\
**Category:** OAuth/OIDC\
**Created:** [August 1, 2022, 2:27pm UTC](https://devforum.okta.com/t/cant-get-javascript-okta-widget-to-work/21439 "2022-08-01T14:27:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skh](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@skh](https://devforum.okta.com/u/skh)\
**Post date:** [August 1, 2022, 2:27pm UTC](https://devforum.okta.com/t/cant-get-javascript-okta-widget-to-work/21439/1 "2022-08-01T14:27:56Z")

</div>

I’m able to get the examples for older versions of the Okta Widget to work – version 3 or so, but newest versions are version 6.5 or 6.6. For those versions, although the developer account I’m using says the request was successful (and this only happens on a correct password, not using MFA yet) the Okta login widget just spins. All I’m trying to do is a Single Page App, that does a login to get an ID token and access token, and prints them out on the page.

Also, the developer documentations mentions “Interaction code” as a grant type, but this isn’t available (visible) on my developer account for Single Page App, so I’m not sure if that’s the problem.

Can someone point me to some example code that works? And maybe provide some tips on how to debug the widget? As I said, the interaction from the server logs appears as though the interaction / login was successful, but the widget just spins. This happens in both Microsoft Edge and Chrome.

Steve

---

<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:** [August 1, 2022, 5:40pm UTC](https://devforum.okta.com/t/cant-get-javascript-okta-widget-to-work/21439/2 "2022-08-01T17:40:39Z")

</div>

Can you set [useInteractionCodeFlow](https://github.com/okta/okta-signin-widget#useinteractioncodeflow) to false in your widget? That flow is only available in Identity Engine orgs and is enabled by default.

If you are using an Okta Classic org, you will want to follow this version of the widget docs: [okta-signin-widget/classic.md at master · okta/okta-signin-widget · GitHub](https://github.com/okta/okta-signin-widget/blob/master/docs/classic.md)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [February 12, 2024, 9:27pm UTC](https://devforum.okta.com/t/cant-get-javascript-okta-widget-to-work/21439/3 "2024-02-12T21:27:24Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
