Using a custom database connection, why is login check not running? (SOLVED)

I am trying to develop a setup with custom database (mongodb).

The implementation is going well. Users can sign in, the custom database script then goes to my API, and I verify the user against the corresponding user in mongoDb. I can hereafter see the user in the Auth0 dashboard.

However, my issue is that when I:

  1. Create a user in Mongo
  2. Log in with that user successfully (the user is now in the Auth0 dashboard)
  3. I delete the user in Mongo (and not in the Auth0 dashboard)
  4. When I now try to login, it works and Auto0 does not verify against my API endpoint! Is that because I need to delete the user in Auth0 as well, or is Auth0 just persisting/caching information so it does not visit my API endpoint to verify on each login?

I hope you can help me clarify, and thanks in advance.

Alex

If using a custom database with import mode then the username password of the user migrated to auth0 and the login script will not be called once migrated. The following should give a good view to the process

https://auth0.com/docs/users/migrations/automatic#the-migration-process

Hi Jeremy.

Thanks for the link, a colleague of mind just solved the problem.

Turns out Auth0 has a functionality called “silent authentication”. This caused Auth0 not to check the login script every time a user logged in. So disabling this solved the issue.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.