Skip to main content
Use this guide to move an existing Replit Auth app to Clerk Auth. Agent handles the migration for eligible apps, so returning users keep access to their existing data.
This automated migration is for apps that use Replit Auth. If your app uses a different authentication system, do not use this flow.

Start the migration

Agent migrations should always run in a new task. You can start the migration in either of these ways:

Start from Agent

1

Create a new task

Select + in the sidebar, or press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows), to create a new task.
The New task view with the create-new-task button highlighted in the sidebar, a tooltip showing the Cmd Shift P shortcut, and the Plan a new task empty state above the Message Agent composer

Plan a new task: describe what you want and Agent creates a plan for you.

2

Use Agent to migrate

In the new task, ask Agent to migrate your app from Replit Auth to Clerk.

Start from the Auth pane

1

Open Tools

In the Project Editor, open Tools.
The Project Editor Tools tab open, showing the tool list with Publishing, Domains, Monitoring, Users & Auth, and more beside the Publishing overview

The Tools tab opens the tool list alongside the active tool.

2

Select Users & Auth

The tool list with Users & Auth highlighted and a tooltip reading 'Let users log in to your App using a prebuilt login page'

Users & Auth in the tool list.

3

Select Update now

In the Introducing a new Replit Auth banner, select Update now.
Project Editor with Users & Auth selected and the Introducing a new Replit Auth banner showing an Update now button

The Users & Auth tool shows the Introducing a new Replit Auth banner and its Update now action.

4

Ask agent to migrate

Select Ask agent to migrate in the dialog.
Introducing a new Replit Auth dialog with an Ask agent to migrate button

The migration overview dialog explains the Clerk Auth update and offers Ask agent to migrate.

Review the migration plan

Whichever way you start, Agent creates the Migrate from Replit Auth to Clerk task and prepares the migration plan. Select View plan and review the plan before the task proceeds.
Agent task titled Migrate from Replit Auth to Clerk with a View plan button and migration-playbook review activity

The Migrate from Replit Auth to Clerk task starts with a View plan action so you can review the migration playbook.

Do not change your app’s authentication code or Clerk credentials while Agent is working.

What Agent does

Agent completes the migration in this order:
  1. It moves your Replit Auth user data to Clerk, including account identity details and supported sign-in credentials.
  2. It waits for the data migration to finish before changing your app.
  3. It updates your app’s sign-in and session logic, restarts the app, and runs available automated checks.

Your app data stays in place

Agent changes only your app’s authentication code. It does not update your app’s existing database data or schema. Your tables and relationships remain intact. Your existing users remain connected to the records they already own, such as profiles, saved work, and permissions.

How long it takes

Expect Agent to work for 10 minutes to an hour. The data migration itself can take several minutes for smaller apps and up to a couple of hours for apps with many users. Agent does not begin changing your app’s code until that migration completes.

After the migration

Before publishing, test the updated app in Development:
  1. Sign in with an existing account and confirm its saved data is available.
  2. Sign out and sign back in.
  3. Create a new test account and confirm it can use the app as expected.

Additional resources