`dbAuth` Forgot Password -- Case-Insensitive Option?

Hey there,

I’ve got an application using the dbAuth built-in forgotPassword functionality, and for the most part it works great! I was wondering if there was an option for the username matching to be case-insensitive, like there is for the login and signUp features? If there is, I haven’t been able to find anything about it in the documentation. It would be greatly appreciated if it isn’t a feature today. Thanks!

Hi!

I actually haven’t used the forgotPassword flow at all yet, but my understanding is that username case-insensitivity is a database concern: Case sensitivity (Reference)

Have you tested and verified its case sensitivity?

Thanks for responding @arimendelow!

Yes, I have verified that it is case-sensitive. A user of mine ran into this issue so I started looking into it to see if there was a case-insensitive option like there is for login and signUp.

It’s not hugely important either way – I think it’s pretty weird of that user to sign up with their email cased one way and then try to reset their password with it cased another way. :upside_down_face: But my client was asking for it and since it is a configuration option for the other 2 features, I was expecting it to be there for forgotPassword as well.

Ah I see - if you want to open a PR for making this change, you’ll want to do it here:

Rather than a simple where, you’ll want to do this:

More info on per-database case-sensitivity here: Self-hosted Authentication (dbAuth) | RedwoodJS Docs

1 Like

Sounds great, thank you for the context!

1 Like