We are doing lazy migration where the existing DB has a lot of account with some special characters that aren’t allowed in Auth0 like * & %
What options do we have?
Cheers,
Karthick.
We are doing lazy migration where the existing DB has a lot of account with some special characters that aren’t allowed in Auth0 like * & %
What options do we have?
Cheers,
Karthick.
Thank you for reaching out to us!
I understand you are asking which options are available for a lazy migration from an existing database when many accounts have usernames containing characters that Auth0 does not accept in usernames, such as *, &, and %.
Recommended Solution
Keep the legacy usernames in a separate field and use email or a sanitized username as the Auth0 identifier, so the migration does not depend on the special characters being valid in Auth0.
As the characters you mention are not in the set of accepted username characters, usernames containing them cannot be stored as-is and we can recommend one of the following options, depending on which best fits your implementation.
Option A: Keep usernames and transform them during migration (recommended if login by legacy username must continue)
Option B: Use email as the primary identifier (recommended if legacy usernames are not a strict requirement)
Option C: Use a Pre User Registration Action for new sign-ups
Allow me to share some additional Knowledge Articles which should prove useful:
Hope this information helped you achieve the desired flow and complete the migration!
Have a great one,
Gerald