# Creating an SPA via management Node sdk has different options than Auth0 UI - cannot login

**URL:** <https://community.auth0.com/t/creating-an-spa-via-management-node-sdk-has-different-options-than-auth0-ui-cannot-login/185446>\
**Category:** Get Help\
**Tags:** clients, management-api\
**Created:** [April 14, 2025, 2:45pm UTC](https://community.auth0.com/t/creating-an-spa-via-management-node-sdk-has-different-options-than-auth0-ui-cannot-login/185446 "2025-04-14T14:45:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![getbounds](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/getbounds/32/70443_2.png) [@getbounds](https://community.auth0.com/u/getbounds)\
**Post date:** [April 14, 2025, 2:45pm UTC](https://community.auth0.com/t/creating-an-spa-via-management-node-sdk-has-different-options-than-auth0-ui-cannot-login/185446/1 "2025-04-14T14:45:05Z")

</div>

Ready to post? 🔍 First, try searching for your answer.  
When I create an spa application from the node management client I cannot login to my app using the client\_id - Unauthorized. I noticed that this application has an APIs section, while when I create an SPA application with the normal Auth0 UI, there is no APIs option. I assume this is the issue. If so, I am not sure what scopes/permissions to give to my client SPA app from my main management API, or if there is an additional option I can set when creating my client app from the Node sdk.

Creation Options from the Node SDK

```JavaScript
  const { data: application } = await management.clients.create({
    name: `${name}-app`,
    app_type: "spa",
    allowed_logout_urls: ["http://localhost:3000/logout"],
    callbacks: ["http://localhost:3000/callback"],
    allowed_origins: ["http://localhost:3000"],
    web_origins: ["http://localhost:3000"],
    allowed_origins: ["http://localhost:3000"],
    oidc_conformant: true,
    organization_usage: "require",
    organization_require_behavior: "post_login_prompt",
    jwt_configuration: {
      lifetime_in_seconds: 60 * 60 * 24,
    },
  });

```

Result from CLI Node App -

 ![image](https://global.discourse-cdn.com/auth0/original/3X/d/1/d1e4233263294a61de9bd15ea206e661c37f099b.png)

Result from UI-Created App -

 ![image](https://global.discourse-cdn.com/auth0/original/3X/8/5/85f36c8772bfcfc06e5d0c1d018c8af80e3b0bfd.png)

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 15, 2025, 7:16pm UTC](https://community.auth0.com/t/creating-an-spa-via-management-node-sdk-has-different-options-than-auth0-ui-cannot-login/185446/3 "2025-04-15T19:16:51Z")

</div>

Hi @getbounds,

I understand you’ve encountered an “Unauthorized” error during login when using your app’s client\_id.

The behavior you observed where a SPA app does not have an APIs section is totally normal. This is because SPAs are public clients and cannot securely store secrets. See [Get Management API Access Tokens for Single-Page Applications - Limitations](https://auth0.com/docs/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-tokens-for-single-page-applications#limitations) for a thorough explanation.

In this case, access tokens are issued in the context of the user who is currently signed in to Auth0, which limits updates to only the logged-in user’s data.

Meaning that, if you need to perform non-user related requests using the Management API, we recommend getting the access token from the backend rather than the frontend in a SPA.

If you are still having issues, could you share the Management API endpoint request you are making?

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 29, 2025, 7:17pm UTC](https://community.auth0.com/t/creating-an-spa-via-management-node-sdk-has-different-options-than-auth0-ui-cannot-login/185446/4 "2025-04-29T19:17:20Z")

</div>

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