Auth0 Home Blog Docs

General Discussion on customizing the hosted login page in Auth0

#1

I am trying to find out a way to disable the username field on signup page but which should work in login page. (** which should be enabled in the Database connections::: Requires username on**)

Can we disable the username field?

#2

Hi @kasarla2709 … I’m a little confused here. How could the username field work if we don’t have a username stored for them?

#3

Yes for example if we have users in the past who has used username and email and if we want to allow users by only email from now. i.e; I am looking to disable username in signup page now.

#4

I seem to recall we looked at the same thing. All our legacy users have a username, and we want them to be able to log in with their username (it is what they are accustomed to) but we want to move new users to email address only. So usernames must be enabled in our Auth0 hosted user data repository.

Assuming usernames are enabled in the user repo, can the “sign up” tab be customized to remove / hide the username field? Since username is required, you still need to provide a username value, but you could use the email address for that.

#5

Thanks for the extra details here.

Turning on “Requires Username” for the Database Connection allows users to use both username or email address (unless customized). Turning that off, though, limits users to email address only.

You can try what @markd mentioned, hiding the username field and using the signup submit event to set the username to something, but that might be brittle and difficult to maintain. I’d suggest either keeping usernames in place to account for the previous users or switch over to email entirely.

2 Likes
closed #6

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