Auth0 Home Blog Docs

Get wrong id token when use one application with several database connection

#1

Hi, I once use an application with only one database connection. But if our team all use one database, something strange will arise. So we decide to split database for each developer. We use a same application and create several database connection in Auth0. But here something strange happened. When I create a new user and log in with the new user account in new database, it will return a id token with a wrong email address. When this token was sent to back end, our back end application will throw exceptions due to the wrong email.

By the way, I search the wrong email in user & role menu, it shows the email was from the old database which I have disconnect it from the application.

I checked the log of sign in script in auth0 custom database section with real-time webtask logs, it returns a correct user account. It seems something happened in authorize endpoint result in the wrong email address.

When I create a standalone application with the new database, it works as excepted. So I can not figure out what’s wrong. If a application should only has a database connection?