Google authentication is case sensitive

Has anyone else had problems with the google authentication being case sensitive. I have some users who cannot log in do to this and well getting their emails off of a distribution list i have no idea what is uppercase and not. I really like the google authentication and do not want to abandon it so I thought I would ask if this was an issue anyone else had before I look at individuals email cases.

Thanks

There’s this thread here on a similar subject :

Closed a properly place .lower() fixed my issue

All signup/login flows should now be case-insensitive - if you’ve found a case that is case-sensitive then please let us know so we can fix it! Thanks.

[Moved to bug reports]

The email that was not working was AmyC@bps.k12.mt.us coming in from google auth where my data table had her as amyc@bps.k12.mt.us so a lower() fixed the issue but I think that is partially our IT guy setting things up with CamelCase. I guess when I was originally asking I thought there might be a case insensitive parameter similar to regular expressions.

Are you using a custom login form here? What exactly is the authentication flow? If you’re using the built-in Google signup/login, everything should be just fine even with CamelCase email addresses.

Using google auth. And the lower did seem to fix it. This afternoon after my friend with a camelcase email gets back from a ski I’ll do some testing to make sure. That way I have a definitive answer for you.

Yes, I understand that you’re using Google Authentication, but is it a custom login/signup form? I ask because using only the built in features of the Users Service there’s nowhere you could use the .lower() function…

So I just had my coworker check it and the issue is when I use google.auth.get_user_email I get a case-sensitive email. When I add .lower() to the end it works

Ah, yes. google.auth.get_user_email() returns the email in its original case. anvil.users.login_with_google() lower-cases it before searching for a user record (same as anvil.users.login_with_email() does).

Thank You. For all your work

1 Like