Do not create user entry if login failed

Hello,

Currently user entry is saved in auth0 database even though user login flow failed, when user connects via SSO. How to avoid user creation if in login workflow action: “onExecutePostLogin” user is redirected and token is not issued?

Hello there @deimas welcome to the community!

Unfortunately, the user will already have been created by the time the Post Login Action runs. The only thing I can really think of is keeping track of the user one way or another and then utilizing the Management API to delete said user.

Is it possible to delete user from auth0 database in login flow? E.G. I add some user metadata that user is deletable and during an action I delete it?

1 Like

That should technically be possible, although not a typical flow - When would the metadata be added? I’m just thinking back to your original question regarding failed login.

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