mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Normalize email when inviting memebers and logging in.
This commit is contained in:
@@ -45,13 +45,15 @@ export const InitialStep = ({
|
||||
return;
|
||||
}
|
||||
|
||||
const sanitizedEmail = email.toLowerCase();
|
||||
|
||||
setIsLoading(true);
|
||||
if (queryParams && queryParams.get("callback_port")) {
|
||||
const callbackPort = queryParams.get("callback_port")
|
||||
|
||||
// attemptCliLogin
|
||||
const isCliLoginSuccessful = await attemptCliLogin({
|
||||
email,
|
||||
email: sanitizedEmail,
|
||||
password,
|
||||
})
|
||||
|
||||
@@ -78,7 +80,7 @@ export const InitialStep = ({
|
||||
}
|
||||
} else {
|
||||
const isLoginSuccessful = await attemptLogin({
|
||||
email,
|
||||
email: sanitizedEmail,
|
||||
password,
|
||||
});
|
||||
if (isLoginSuccessful && isLoginSuccessful.success) {
|
||||
|
||||
@@ -60,7 +60,7 @@ type Props = {
|
||||
};
|
||||
|
||||
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>;
|
||||
|
||||
Reference in New Issue
Block a user