chore: bump version to 2.21.19 in package.json and enhance invitation validation (#434)
- Updated application version from 2.21.18 to 2.21.19 in package.json. - Improved invitation validation by handling cases where the invitation is not found and ensuring email comparison is case insensitive.
This commit is contained in:
committed by
GitHub
parent
43038034fd
commit
4aac04ef0a
@@ -81,8 +81,17 @@ async function JoinTeamAccountPage(props: JoinTeamAccountPageProps) {
|
||||
// the user is logged in, we can now check if the token is valid
|
||||
const invitation = await api.getInvitation(adminClient, token);
|
||||
|
||||
// the invitation is not found or expired or the email is not the same as the user's email
|
||||
const isInvitationValid = invitation?.email === auth.data.email;
|
||||
if (!invitation) {
|
||||
return (
|
||||
<AuthLayoutShell Logo={AppLogo}>
|
||||
<InviteNotFoundOrExpired />
|
||||
</AuthLayoutShell>
|
||||
);
|
||||
}
|
||||
|
||||
// the invitation is not found or expired or the email is not the same as the user's email (case insensitive)
|
||||
const isInvitationValid =
|
||||
invitation.email.toLowerCase() === auth.data.email.toLowerCase();
|
||||
|
||||
if (!isInvitationValid) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user