mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-29 21:37:21 +02:00
nit- update casing enforcement on frontend
This commit is contained in:
@@ -47,11 +47,14 @@ export function EmailPasswordForm({
|
|||||||
password: Yup.string().required(),
|
password: Yup.string().required(),
|
||||||
})}
|
})}
|
||||||
onSubmit={async (values) => {
|
onSubmit={async (values) => {
|
||||||
|
// Ensure email is lowercase
|
||||||
|
const email = values.email.toLowerCase();
|
||||||
|
|
||||||
if (isSignup) {
|
if (isSignup) {
|
||||||
// login is fast, no need to show a spinner
|
// login is fast, no need to show a spinner
|
||||||
setIsWorking(true);
|
setIsWorking(true);
|
||||||
const response = await basicSignup(
|
const response = await basicSignup(
|
||||||
values.email,
|
email,
|
||||||
values.password,
|
values.password,
|
||||||
referralSource
|
referralSource
|
||||||
);
|
);
|
||||||
@@ -78,10 +81,10 @@ export function EmailPasswordForm({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const loginResponse = await basicLogin(values.email, values.password);
|
const loginResponse = await basicLogin(email, values.password);
|
||||||
if (loginResponse.ok) {
|
if (loginResponse.ok) {
|
||||||
if (isSignup && shouldVerify) {
|
if (isSignup && shouldVerify) {
|
||||||
await requestEmailVerification(values.email);
|
await requestEmailVerification(email);
|
||||||
// Use window.location.href to force a full page reload,
|
// Use window.location.href to force a full page reload,
|
||||||
// ensuring app re-initializes with the new state (including
|
// ensuring app re-initializes with the new state (including
|
||||||
// server-side provider values)
|
// server-side provider values)
|
||||||
|
Reference in New Issue
Block a user