0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

fix(core): invitee email check should be case insensitive (#5823)

* fix(core): invitee email check should be case insensitive

* chore: add changeset
This commit is contained in:
Charles Zhao 2024-05-06 10:21:45 +08:00 committed by GitHub
parent 3e5ffc4991
commit b4b8015db5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@logto/core": patch
---
fix a bug that prevents invitee from accepting the organization invitation if the email letter case is not matching

View file

@ -157,7 +157,7 @@ export class OrganizationInvitationLibrary {
const user = await userQueries.findUserById(acceptedUserId); const user = await userQueries.findUserById(acceptedUserId);
if (user.primaryEmail !== entity.invitee) { if (user.primaryEmail?.toLowerCase() !== entity.invitee.toLowerCase()) {
throw new RequestError({ throw new RequestError({
status: 422, status: 422,
code: 'request.invalid_input', code: 'request.invalid_input',