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:
parent
3e5ffc4991
commit
b4b8015db5
2 changed files with 6 additions and 1 deletions
5
.changeset/popular-chicken-share.md
Normal file
5
.changeset/popular-chicken-share.md
Normal 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
|
|
@ -157,7 +157,7 @@ export class OrganizationInvitationLibrary {
|
|||
|
||||
const user = await userQueries.findUserById(acceptedUserId);
|
||||
|
||||
if (user.primaryEmail !== entity.invitee) {
|
||||
if (user.primaryEmail?.toLowerCase() !== entity.invitee.toLowerCase()) {
|
||||
throw new RequestError({
|
||||
status: 422,
|
||||
code: 'request.invalid_input',
|
||||
|
|
Loading…
Reference in a new issue