🐛 Fix issue where users are unable to login due to mismatch in case (#1579)

This commit is contained in:
Luke Vella 2025-02-25 16:19:46 +00:00 committed by GitHub
parent 6923824ea7
commit a1f50dc792
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,7 +38,7 @@ export function OTPForm({ email }: { email: string }) {
const handleSubmit = form.handleSubmit(async (data) => {
const url = `${
window.location.origin
}/api/auth/callback/email?email=${encodeURIComponent(email)}&token=${data.otp}`;
}/api/auth/callback/email?email=${encodeURIComponent(email.toLowerCase())}&token=${data.otp}`;
const res = await fetch(url);
const resUrl = new URL(res.url);