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) => {
|
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
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user