fix: trim username, email and password on sign in and sign up page

This commit is contained in:
Elias Schneider
2024-10-15 20:29:34 +02:00
parent 613bae9033
commit 77a092a3cf
2 changed files with 2 additions and 2 deletions

View File

@@ -97,7 +97,7 @@ const SignInForm = ({ redirectPath }: { redirectPath: string }) => {
const signIn = async (email: string, password: string) => { const signIn = async (email: string, password: string) => {
await authService await authService
.signIn(email, password) .signIn(email.trim(), password.trim())
.then(async (response) => { .then(async (response) => {
if (response.data["loginToken"]) { if (response.data["loginToken"]) {
// Prompt the user to enter their totp code // Prompt the user to enter their totp code

View File

@@ -48,7 +48,7 @@ const SignUpForm = () => {
const signUp = async (email: string, username: string, password: string) => { const signUp = async (email: string, username: string, password: string) => {
await authService await authService
.signUp(email, username, password) .signUp(email.trim(), username.trim(), password.trim())
.then(async () => { .then(async () => {
const user = await refreshUser(); const user = await refreshUser();
if (user?.isAdmin) { if (user?.isAdmin) {