From af4449e1fa3afd30e2eba9c0e21a27596880a08f Mon Sep 17 00:00:00 2001 From: Ahnaf An Nafee Date: Sun, 6 Mar 2022 22:55:58 -0500 Subject: [PATCH] fixed resizing issue with auth --- components/SignIn.js | 22 ++++++++++++---------- components/SignUp.js | 9 ++++----- pages/authenticate.js | 24 ++---------------------- 3 files changed, 18 insertions(+), 37 deletions(-) diff --git a/components/SignIn.js b/components/SignIn.js index a2b9968..eeb2d1d 100644 --- a/components/SignIn.js +++ b/components/SignIn.js @@ -51,16 +51,9 @@ export default function SignIn() { }, validationSchema: Yup.object().shape({ email: Yup.string().email("Invalid email").required("Required"), - password: Yup.string() - // TODO: Will be added during prod - // .matches( - // /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$/, - // "Password must contain at least 8 characters, one uppercase, one lowercase and one number" - // ) - .required("Required"), + password: Yup.string().min(8, "Too small!").required("Required"), }), async onSubmit(values, formikActions) { - console.log(values); try { const { user, session, error } = await supabaseClient.auth.signIn({ @@ -88,7 +81,12 @@ export default function SignIn() { return (
- + Email address {errors.email} - + Password { - setValue(newValue); - }; - return (
@@ -39,11 +27,11 @@ function AuthPage(props) {