fix: trim username, email and password on sign in and sign up page
This commit is contained in:
@@ -97,7 +97,7 @@ const SignInForm = ({ redirectPath }: { redirectPath: string }) => {
|
||||
|
||||
const signIn = async (email: string, password: string) => {
|
||||
await authService
|
||||
.signIn(email, password)
|
||||
.signIn(email.trim(), password.trim())
|
||||
.then(async (response) => {
|
||||
if (response.data["loginToken"]) {
|
||||
// Prompt the user to enter their totp code
|
||||
|
||||
@@ -48,7 +48,7 @@ const SignUpForm = () => {
|
||||
|
||||
const signUp = async (email: string, username: string, password: string) => {
|
||||
await authService
|
||||
.signUp(email, username, password)
|
||||
.signUp(email.trim(), username.trim(), password.trim())
|
||||
.then(async () => {
|
||||
const user = await refreshUser();
|
||||
if (user?.isAdmin) {
|
||||
|
||||
Reference in New Issue
Block a user