Change Application Type from M2M to SPA or Regular Web App

,

Overview

Applications set as Machine-to-Machine (M2M) occasionally require modification to a Single-Page Application (SPA) or a Regular web application type. This alteration is necessary when the application’s operational context changes or aligns with specific authentication flows.

Cause

Solution

To transition an application from M2M to SPA or Regular web application type, one must utilize the Management API and update the application’s settings by sending a specifically structured payload.

  1. Obtain an API token.

    a. Access the dashboard.
    b. Navigate to APIs, select Auth0 Management API, and then API Explorer.
    d. Copy the provided token from this page.

  2. Update the application type:

    a. With the API token, proceed to Management API Update a client endpoint.
    b. Insert the copied API token into the Set API Token field.
    d. Input the Client ID into the path parameter id.

  3. Choose the payload according to the desired application type and include it in the request body:

{
“app_type”: “spa”
}

For Regular web applications:

{
“app_type”: "regular_web”
}

  1. Test the updated settings by pressing the Test Endpoint button.

  2. Ensure a Response Code of 200 is received, indicating the successful update. Verify the changes in a test environment before applying them to production.