Files
supabase/apps/docs/content/troubleshooting/migrating-auth-users-between-projects.mdx
Charis 47705a8968 chore: replace all supabase urls with relative urls (#38537)
* fix: rewrite relative URLs when syncing to GitHub discussion

Relative URLs back to supabse.com won't work in GitHub discussions, so
rewrite them back to absolute URLs starting with https://supabase.com

* fix: replace all supabase urls with relative urls

* chore: add linting for relative urls

* chore: bump linter version

* Prettier

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2025-09-09 12:54:33 +00:00

30 lines
1.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title = "Migrating Auth Users Between Supabase Projects"
topics = [ "auth" ]
keywords = [ "migration", "users" ]
database_id = "7bd3de18-a4ab-4b76-85e4-b72924dacd2a"
---
You can migrate all tables in the auth schema—including users and their hashed passwords—from one Supabase project to another. This means users do not need to reset or recreate their passwords after migration.
## Important: JWT secret and token validity
Each project is provisioned with a unique JWT secret used to sign and verify auth tokens. This has two key implications:
- If the JWT secret is different in the new project, existing tokens will become invalid, and users will be required to log in again to get new tokens.
- If you reuse the original JWT secret in the new project, existing tokens will remain valid and users will not need to re-authenticate.
You can configure a custom JWT secret in the new project by going to:
[Settings > API > JWT Secret](/dashboard/project/_/settings/api)
Note: Updating the JWT secret will regenerate your anon and service_role API keys in the new project.
## How to migrate Auth data
We dont currently provide a one-size-fits-all script for migrating only the auth schema, but the process is covered in our general migration guide. You can use either:
- A full .backup file from the dashboard, or
- SQL export/import via the Supabase CLI (e.g., pg_dump and psql)
[View Full Migration Guide](/docs/guides/platform/migrating-within-supabase)