# Unable to add sign-in widget on SPA for non-developer edition

**URL:** <https://devforum.okta.com/t/unable-to-add-sign-in-widget-on-spa-for-non-developer-edition/30986>\
**Category:** OAuth/OIDC\
**Tags:** widget, idx\
**Created:** [October 19, 2024, 3:36am UTC](https://devforum.okta.com/t/unable-to-add-sign-in-widget-on-spa-for-non-developer-edition/30986 "2024-10-19T03:36:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomaslu.earthdaily](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@thomaslu.earthdaily](https://devforum.okta.com/u/thomaslu.earthdaily)\
**Post date:** [October 19, 2024, 3:36am UTC](https://devforum.okta.com/t/unable-to-add-sign-in-widget-on-spa-for-non-developer-edition/30986/1 "2024-10-19T03:36:48Z")

</div>

I had once been able to use the Okta CDN to quickly add the Okta Sign-In Widget to a single-page HTML application, thereby achieving an authentication requirement. This had been done on Okta Classic Engine.

Our organization has since moved to Okta Identity Engine, and I attempted to follow the provided example in the Embedded Okta Sign-In Widget fundamentals documentation as a starting point to build another SPA. However, the widget displays “There was an unexpected internal error. Please try again.” regardless of whether or not a user was already logged into Okta.

The documentation does say that Okta Developer Edition organization is needed, whereas our’s is not, and our Security \> API did not have Authorization Servers to configure access policies. However, this hadn’t been a blocker when I previously built SPA’s within the organization.

Although for the time being, I’ve been able to create my own login form and pass the username/password to the Okta Auth API, I would prefer to use the embedded sign-in widget.

How would I get the embedded sign-in widget working within a single page app in Okta Identity Engine, in a non-developer edition organization now?

---

<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:** [October 21, 2024, 5:41pm UTC](https://devforum.okta.com/t/unable-to-add-sign-in-widget-on-spa-for-non-developer-edition/30986/2 "2024-10-21T17:41:48Z")

</div>

> [@thomaslu.earthdaily](#):
>
> There was an unexpected internal error. Please try again.

I found two articles in our help center that address this error, can you check if either apply yo you?

- [Okta Login Screen Error “There was an unexpected Internal Error. Please try again”](https://support.okta.com/help/s/article/Users-receiving-an-error-in-the-Okta-logon-screen-There-was-an-unexpected-Internal-ErrorPlease-try-again?language=en_US)
- [“There was an unexpected internal” Error - 400 Bad Request Error with the /interact Endpoint](https://support.okta.com/help/s/article/deactivating-an-application-caused-401-error-in-the-authorize-request?language=en_US)

I’d also recommend making sure the Org and application in your OIE org are both configured to support Interaction Code, as described in our docs here: [Embedded Okta Sign-In Widget fundamentals | Okta Developer](https://developer.okta.com/docs/guides/embedded-siw/main/#configure-the-app-integration)

---

<div class="post-metadata">

**Author:** ![thomaslu.earthdaily](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@thomaslu.earthdaily](https://devforum.okta.com/u/thomaslu.earthdaily)\
**Post date:** [October 21, 2024, 10:24pm UTC](https://devforum.okta.com/t/unable-to-add-sign-in-widget-on-spa-for-non-developer-edition/30986/3 "2024-10-21T22:24:17Z")

</div>

Hi @andrea,

Neither of these articles apply to our situation.

- Our Okta login page URL does not contain a period at the end.
- The Okta OIDC application was created, active, and assigned to me.

Additionally, the OIDC application’s **Grant Type \> Other grants \> Interaction** code was selected, as was **Settings \> Account \> Embedded widget sign-in support \> Interaction code**.

As previously mentioned I had followed [Embedded Okta Sign-In Widget fundamentals | Okta Developer](https://developer.okta.com/docs/guides/embedded-siw/main/#configure-the-app-integration) step-by-step, replacing the {widgetVersion}, {yourOktaDomain}, {yourClientId} and redirectUri in the HTML/JS as necessary; the only exception being that our OIE does not have _Security \> API \> Authorization Servers_ from which to configure the authorization server default policy. (_Settings \> Account \> Embedded widget sign-in support_ shows that we have 0 authorization servers, with a link to https://{okta-admin-domain}/admin/oauth2/as which displays _HTTP 500: Internal Server Error_.)

Is the sign-in widget supposed to work in OIE, or only on the developer edition?

EDIT:  
I should add that I get the following errors on the console:

- `Failed to load resource: https:{okta-domain}/oauth2/default/.well-known/openid-configuration. The server responded with a status of 401 ()`
- `AuthApiError: You do not have permission to access the feature you are requesting at \n m (request.ts:64:11) \n at request.ts:182:13 \n (anonymous)	@	(index):55`

---

<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:** [October 22, 2024, 4:19pm UTC](https://devforum.okta.com/t/unable-to-add-sign-in-widget-on-spa-for-non-developer-edition/30986/4 "2024-10-22T16:19:07Z")

</div>

Those errors are helpful!

> - `Failed to load resource: https:{okta-domain}/oauth2/default/.well-known/openid-configuration. The server responded with a status of 401 ()`

Make sure to set the [`issuer` for the widget](https://github.com/okta/okta-signin-widget?tab=readme-ov-file#issuer) to _just_ your Okta Domain. This will tell the widget to use the Org Authorization Server. The Default one it is trying to hit is a different server and is associated with the paid API Access Management feature, which must not be available in the org you are testing.

---

<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:** [November 21, 2024, 4:19pm UTC](https://devforum.okta.com/t/unable-to-add-sign-in-widget-on-spa-for-non-developer-edition/30986/5 "2024-11-21T16:19:30Z")

</div>

Closed on November 21, 2024, 4:19pm UTC

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