/
Contact usSee pricingStart building
Node
​

    About Stytch

    Introduction
    Integration Approaches
      Full-stack overview
      Frontend (pre-built UI)
      Frontend (headless)
      Backend
    Migrations
      Migration overview
      Migrating users statically
      Migrating users dynamically
      Additional migration considerations
      Zero-downtime deployment
      Defining external IDs for users
      Exporting from Stytch
    Custom Domains
      Overview

    Authentication

    DFP Protected Auth
      Overview
      Setting up DFP Protected Auth
      Handling challenges
    Magic Links
    • Email Magic Links

      • Getting started with the API
        Getting started with the SDK
        Replacing your password reset flow
        Building an invite user flow
        Add magic links to an existing auth flow
        Adding PKCE to a Magic Link flow
        Magic Link redirect routing
    • Embeddable Magic Links

      • Getting started with the API
    MFA
      Overview
      Backend integration
      Frontend integration
    Mobile Biometrics
      Overview
    M2M Authentication
      Authenticate an M2M Client
      Rotate client secrets
      Import M2M Clients from Auth0
    OAuth
    • Identity providers

      • Overview
        Provider setup
      Getting started with the API (Google)
      Add Google One Tap via the SDK
      Email address behavior
      Adding PKCE to an OAuth flow
    Connected AppsBeta
      Setting up Connected Apps
      About Remote MCP Servers
    • Resources

      • Integrate with AI agents
        Integrate with MCP servers
        Integrate with CLI Apps
    Passcodes
      Getting started with the API
      Getting started with the SDK
    • Toll fraud

      • What is SMS toll fraud?
        How you can prevent toll fraud
      Unsupported countries
    Passkeys & WebAuthn
    • Passkeys

      • Passkeys overview
        Set up Passkeys with the frontend SDK
    • WebAuthn

      • Getting started with the API
        Getting started with the SDK
    Passwords
      Getting started with the API
      Getting started with the SDK
      Password strength policy
    • Email verification

      • Overview
        Email verification before password creation
        Email verification after password creation
    Sessions
      How to use sessions
      Backend integrations
      Frontend integrations
      Custom claims
      Custom claim templates
      Session tokens vs JWTs
      How to use Stytch JWTs
    TOTP
      Getting started with the API
      Getting started with the SDK
    Web3
      Getting started with the API
      Getting started with the SDK

    Authorization

    Implement RBAC with metadata

    3rd Party Integrations

    Planetscale
    Supabase
    Feathery
    Unit

    Testing

    E2E testing
    Sandbox values
Get support on SlackVisit our developer forum

Contact us

Consumer Authentication

/

Guides

/

Authentication

/

M2M Authentication

/

Import M2M Clients from Auth0

Import M2M Clients from Auth0

Stytch's M2M Authentication supports importing clients from other platforms like Auth0. Use Stytch to import pre-existing client_ids, client_secrets, and assigned scopes without any data transformations or downtime.

Before you start

In order to complete this guide, you'll need the following:

  • A Stytch B2B project. If you don't have one already, in the Dashboard, click on your existing project name in the top left corner of the Dashboard, click Create a new project, and then select B2B Authentication.
  • The project Test environment's project_id and secret from the API keys section. You'll need to pass these values into the Authorization request header for every Stytch API call.
  • Existing clients stored in a different M2M service.

Step 1: Access your existing client

First, access your existing client wherever it is stored. For this guide, we'll use Auth0 as an example.

On Auth0 and under Applications, select an already created M2M client.

Auth0 client

You'll need to find and copy the client's values that correspond to the following Stytch M2M Client fields:

  • client_id
  • client_secret

Step 2: Import the client via API or the Dashboard UI

In this guide, you'll use the Dashboard UI to do the import.

In the Dashboard, navigate to M2M Clients and then click the Import button. A popup modal will appear prompting you to enter the client ID and secret.

Import client to Stytch

Enter the client's values you copied from Step 1 and click Import.

Step 3: Add any additional metadata

After the import, you can update the M2M Client with additional metadata like client_name and client_description.

Edit M2M client

More importantly, you can transfer any previously defined scopes during this step. In Auth0, navigate to your client's permissions and record the scopes you want to transfer.

Auth0 permissions

Then in Stytch, scroll down to the Scopes section of the newly imported M2M Client and click + Add scopes. A popup modal will appear prompting you to type in the scopes and separate them by a single space.

Import scopes

Click Save when you've finished editing the M2M Client.

Step 4: Validate the access token's payload

To confirm a successful import, issue an access token for the M2M Client and decode the JWT.

{
  "aud": [
    "PROJECT_ID"
  ],
  "exp": 1693492107,
  "iat": 1693488507,
  "iss": "stytch.com/PROJECT_ID",
  "nbf": 1693488507,
  "scope": "read:users update:users",
  "sub": "lJJsWpAmd42q0EEJHJoSAxTPzdgpzF0i"
}

The access token's payload and standard claims should show the following data:

  • The iss and sub match or contain your project_id.
  • The scope matches the scopes you entered in Step 3.
  • The sub matches the client_id you imported from Steps 1 and 2.

If the criteria are met, your M2M Client has successfully been imported to Stytch.

Before you start

Step 1: Access your existing client

Step 2: Import the client via API or the Dashboard UI

Step 3: Add any additional metadata

Step 4: Validate the access token's payload