Disable username from username-password authentication

Hello community!

At the moment we have the current solution:

  • regular database connection that requires username for signup
  • login with username or email attr

We are planning to:

  • Disable authentication for username attr and leave only email as valid attr for login

what would be the best approach to achieve this? I can not find a clear way to do it on docs/community old post

In addition:

  • Is it possible to know during post-login actions if the user logged in with username or email for authentication?

Thanks in advance!!!

Hello @ezequiel.sandoval,

Welcome to the Community! I’m not sure if this answers your question but if you disable usernames, users who already had a username can continue to log in with their username.

Mark

2 Likes

Yes, I tried that approach and i saw that behaviour, so, in order to “remove” username login we should disable this and also delete that attribute from users entries?

I would say yes but I’m not sure you can delete the username with the API in its current state. If you manage to do so, please let me know!

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