google sign in with oauth 2.0. no more console errors or warnings

This commit is contained in:
jackiettran
2025-10-08 12:46:25 -04:00
parent 299522b3a6
commit 052781a0e6
8 changed files with 186 additions and 93 deletions

View File

@@ -146,11 +146,11 @@ const validateLogin = [
// Google auth validation
const validateGoogleAuth = [
body("idToken")
body("code")
.notEmpty()
.withMessage("Google ID token is required")
.isLength({ max: 2048 })
.withMessage("Invalid token format"),
.withMessage("Authorization code is required")
.isLength({ max: 512 })
.withMessage("Invalid authorization code format"),
handleValidationErrors,
];