I can’t login after completing my database migration (as outlined here: Configure Automatic Migration from Your Database)
Here’s what I did for my test run at this:
- Switched the default “Username-Password-Authentication” database to “Use my own database” and turned on “Import Users to Auth0” in settings.
- I configured the “Login” and “Get User” database action scripts.
- I was then able to login using credentials from the custom database, and the user was created in Auth0 within the “Username-Password-Authentication” database.
- Once my single user was imported, I edited the two database action scripts so that they returned the NO-OP function as outlined in the docs.
- I then turned off “Import Users to Auth0”.
- At this point I could no longer login using the credentials from the old database.
- After reseting the passwordI could login.
- I then noticed that there were now additional database action scripts. The guide says “You will need to implement the other script types for sign up, email verification, password reset and delete user functionality on the Auth0 database that you have migrated to.”… so I’m not sure what to do there (more NO-OP scripts?)
- “Use my own database” cannot be turned off now, due to there being members already in the database.
So how do I tidy this up? And is it possible to avoid having all my users having to change their passwords?
Just a quick questions.
- This part “After reseting the passwordI could login.”, you couldn’t login to your application or the dashboard?
- Do you have any rule enable in your account?
…] is it possible to avoid having all my users having to change their passwords?
If you migrate from a custom DB to Auth0, Your users are not asked to reset their password as a result of the migration.(as it is said here: Configure Automatic Migration from Your Database)
Hi Paulimar,
Thanks for your questions.
I couldn’t login to my application after resetting the password. The user/email I was testing was not the same as my Auth0 dashboard/admin user.
There are no rules enabled in the account.
The docs don’t seem to reflect my reality. The password does not seem to be stored in the Auth0 database after migration.
I see, in the documentation its advised that you leave the “Import Users to Auth0” switch on, which you turned off in step 5. Since this is problematic and you did is so easily, wouldn’t it be best for the auth0 dashboard to remind us that this operation could cause issues like the one you experienced? I find it dangerous that you can deny access to users with this simple action.
I confirmed that you can turn the switch on and off freely, and by switching it off you disable passwords all together, and it doesn’t even allow you to reset users passwords. By switching it on you can log in again and reset passwords through the dashboard.