Skip to main content

Integrating Clerk

What is Clerk?

Clerk is a comprehensive authentication and user management platform that provides a modern solution for handling user sign-ups, sign-ins, and identity management. It offers features like multi-session management, pre-built UI components, and various authentication methods including social logins, passwordless authentication, and multi-factor authentication (MFA). Clerk is designed to be developer-friendly while maintaining high security standards and providing a smooth user experience.

Important Notice: Please note that you cannot use both Auth0 and Clerk simultaneously with Teyuto. Enabling one integration will automatically disable the other, as they are mutually exclusive authentication providers.

Important Note: It is recommended to use a production account when migrating domains to avoid low rate limits that might affect the migration process.

Creating an account on Clerk

  • Go to the Clerk website and create an account if you don't already have one.

Getting Required Credentials from Clerk

After logging in to your Clerk dashboard, you'll need to retrieve 2 essential information:

  1. Domain:

    • Navigate to the Configure section
    • Look for the Domain settings
    • Copy the complete domain URL including the https:// prefix
    • Example format: https://large-marlin-72.clerk.accounts.dev (If you own a custom domain with Clerk you can use it.)
  2. Secret Key:

    • Go to the Configure section
    • Find the API Keys subsection
    • Locate and copy the CLERK_SECRET_KEY

Add integration in Teyuto

  • Access the Settings section and then Plugins
  • Search for "Clerk"
  • Click on Connect
  • Enter the Domain and Secret Key you obtained from Clerk
  • Click Connect to finalize the integration

User Migration Process (optinal)

The migration process for Clerk differs from Auth0 and requires manual operation. To migrate your existing users:

  1. Request User Data:

    • Contact Teyuto support at [email protected] to request your users.json file (which corresponds to the list of users to be migrated; it is important to be specific if you require users in a particular date range or simply all of them).
    • This file will contain all necessary user data for migration
  2. Use Official Migration Tool:

    • Clerk provides an official migration script available at: https://github.com/clerk/migration-script
    • Follow the instructions in the repository to migrate your users using the users.json file provided by Teyuto

The migration process must be handled carefully to ensure all user data is transferred correctly. Make sure to test the migration in a development environment before proceeding with production data.