lock icon indicating copy to clipboard operation
lock copied to clipboard

Username field on the lock allows spaces.

Open thduttonuk opened this issue 4 years ago • 3 comments

image

Description

We are using the latest version of the lock 11.23.1 and it allows spaces in the username.

Reproduction

Enter a space in the username on the signup screen.

Environment

We are using Angular with the auth0-lock package. Also we are adding addition fields.

thduttonuk avatar Apr 30 '20 08:04 thduttonuk

Also the documentation does not say it allows spaces https://auth0.com/docs/connections/database/require-username

thduttonuk avatar Apr 30 '20 08:04 thduttonuk

Thanks for raising @thduttonuk - let us look into it.

stevehobbsdev avatar May 01 '20 13:05 stevehobbsdev

@stevehobbsdev I have looked into this more. Its when you have "Use my own database" turned on.

More info When you have completed your migration and not set the Login/Get User scripts to no-op it does not validate using the regex on the username

thduttonuk avatar May 01 '20 13:05 thduttonuk

Thanks for your patience here! I appreciate there's been a long time since we looked into this issue.

I can reproduce this with a custom database. I've noticed from the client setting file that is downloaded when Lock initialized, that the validation rules around username are only transmitted to us if the "Username length" settings are enabled in the dashboard. And to enable those, you have to turn on "Import Users to Auth0":

image

I am currently querying internally as to whether this is intended behaviour or not.

stevehobbsdev avatar Sep 09 '22 12:09 stevehobbsdev

I heard back from the team internally; this is in fact expected behaviour, but is something they plan on improving. Once they implement that on the server, those validation rules should be picked up by Lock.

I'll close this for now and thanks again for your patience.

stevehobbsdev avatar Sep 09 '22 15:09 stevehobbsdev