mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 17:27:40 +00:00
Normalize email when inviting memebers and logging in.
This commit is contained in:
@@ -45,13 +45,15 @@ export const InitialStep = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sanitizedEmail = email.toLowerCase();
|
||||||
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
if (queryParams && queryParams.get("callback_port")) {
|
if (queryParams && queryParams.get("callback_port")) {
|
||||||
const callbackPort = queryParams.get("callback_port")
|
const callbackPort = queryParams.get("callback_port")
|
||||||
|
|
||||||
// attemptCliLogin
|
// attemptCliLogin
|
||||||
const isCliLoginSuccessful = await attemptCliLogin({
|
const isCliLoginSuccessful = await attemptCliLogin({
|
||||||
email,
|
email: sanitizedEmail,
|
||||||
password,
|
password,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -78,7 +80,7 @@ export const InitialStep = ({
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const isLoginSuccessful = await attemptLogin({
|
const isLoginSuccessful = await attemptLogin({
|
||||||
email,
|
email: sanitizedEmail,
|
||||||
password,
|
password,
|
||||||
});
|
});
|
||||||
if (isLoginSuccessful && isLoginSuccessful.success) {
|
if (isLoginSuccessful && isLoginSuccessful.success) {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const addMemberFormSchema = yup.object({
|
const addMemberFormSchema = yup.object({
|
||||||
email: yup.string().email().required().label("Email").trim()
|
email: yup.string().email().required().label("Email").trim().lowercase()
|
||||||
});
|
});
|
||||||
|
|
||||||
type TAddMemberForm = yup.InferType<typeof addMemberFormSchema>;
|
type TAddMemberForm = yup.InferType<typeof addMemberFormSchema>;
|
||||||
|
|||||||
Reference in New Issue
Block a user