Fixed user exist checking with trimmed email input #3195 (#3251)

This commit is contained in:
rakan makhashin 2024-01-05 17:13:05 +03:00 committed by GitHub
parent f7034d6e7d
commit 036c8c0b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ export const useSignInUp = () => {
}
checkUserExistsQuery({
variables: {
email: form.getValues('email').toLowerCase(),
email: form.getValues('email').toLowerCase().trim(),
},
onCompleted: (data) => {
if (data?.checkUserExists.exists) {
@ -130,11 +130,11 @@ export const useSignInUp = () => {
const { workspace: currentWorkspace } =
signInUpMode === SignInUpMode.SignIn
? await signInWithCredentials(
data.email.toLowerCase(),
data.email.toLowerCase().trim(),
data.password,
)
: await signUpWithCredentials(
data.email.toLowerCase(),
data.email.toLowerCase().trim(),
data.password,
workspaceInviteHash,
);