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

#2621 changed email on sign in, sign up, request reset password link to low… #2750

Merged
merged 3 commits into from
Jul 13, 2022

Conversation

OskarKocjan
Copy link
Contributor

@OskarKocjan OskarKocjan commented Jul 12, 2022

Changes 1:

  • email field is no longer case-sensitive on a sign in
  • every email string changed to lower case in list/verification/curator-service/ui/src/redux/auth/thunk.ts

@OskarKocjan OskarKocjan self-assigned this Jul 12, 2022
@OskarKocjan OskarKocjan changed the title changed email on sign in, sign up, request reset password link to low… #2621 changed email on sign in, sign up, request reset password link to low… Jul 12, 2022
@OskarKocjan
Copy link
Contributor Author

OskarKocjan commented Jul 12, 2022

Changes 2:

  • deleted code that changed email string to lower case in list/verification/curator-service/ui/src/redux/auth/thunk.ts
  • added new obj to additional user indexes for searching with case-insensitive option
  • applied a case-insensitive filter to find a user with a given email from server-side

Copy link
Contributor

@maciej-zarzeczny maciej-zarzeczny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order for those changes to work properly a new case insensitive index should be added for the email field in the users collection. The changes that you made here won't take any effect, as you are adding collation to googleID field instead of email. In order to add a new index you should follow instructions in /data-serving/scripts/setup-db/README.md.

@OskarKocjan
Copy link
Contributor Author

Changes 3:

  • removed earlier obj to additional user indexes
  • created a new migration with new additional user indexes for email case-insensitive searching

Copy link
Contributor

@maciej-zarzeczny maciej-zarzeczny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@abhidg abhidg merged commit a9b141e into main Jul 13, 2022
@abhidg abhidg deleted the 2621-sign-in-email-field-case-insensitive branch July 13, 2022 09:57
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

Successfully merging this pull request may close these issues.

None yet

3 participants