Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case insensitive or case sensitive? #281

Open
cristianrat opened this issue Sep 25, 2022 · 1 comment
Open

Case insensitive or case sensitive? #281

cristianrat opened this issue Sep 25, 2022 · 1 comment

Comments

@cristianrat
Copy link

TL;DR;
On my DRF I only use emails as username
So for example [email protected] signs up.
Then every time he logs in, he needs to type in [email protected]
[email protected] won't work
IMO, this shouldn't really be the case, I wouldn't allow [email protected] to sign up and then allow him another user with the same email but all lowercase (it doesn't work anyway, as the db would prevent it: django.db.utils.IntegrityError: duplicate key value violates unique constraint "users_customuser_email_key")
So the question is, should Knox support this (ie: be case insensitive) or should I be writing some extra functionality to make sure that all usernames (ie: email) are sent to my API as lowercase?

@rahulrameshan
Copy link

it is always better that you pass all the email in lowercase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants