Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

adds stricter password validation

Alaister Youngcce57714032c
diff --git a/package-lock.json b/package-lock.json
index 35eb56bebc3..2dbf19aca1b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -55,7 +55,7 @@
"jsrsasign": "^10.5.26",
"lodash": "^4.17.21",
"markdown-toc": "^1.2.0",
- "next": "12.0.9",
+ "next": "12.1.0",
"next-compose-plugins": "^2.2.1",
"next-mdx-remote": "^3.0.8",
"next-themes": "0.0.15",
@@ -177,176 +177,6 @@
"react": "^16.13.1 || ^17.0.0"
}
},
- "apps/temp-docs/node_modules/@next/env": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/env/-/env-12.0.9.tgz",
- "integrity": "sha512-oBlkyDop0Stf7MPIzETGv5r0YT/G/weBrknoPOUTaa5qwOeGjuy6gsOVc/SBtrBkOoBmRpD+fFhQJPvmo1mS+g=="
- },
- "apps/temp-docs/node_modules/@next/swc-android-arm64": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.0.9.tgz",
- "integrity": "sha512-aVqgsEn5plmUH2X58sjzhHsH/6majucWTMaaBEs7hHO2+GCwCZc7zaLH4XCBMKPES9Yaja8/pYUbvZQE9DqgFw==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-darwin-arm64": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.0.9.tgz",
- "integrity": "sha512-uAgRKm4a2nVdyBiPPJokvmDD1saugOvxljz9ld2ih0CCg5S9vBhqaj3kPGCQBj9hSu3q+Lng2CHnQqG3ga1jzA==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-darwin-x64": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.0.9.tgz",
- "integrity": "sha512-fDOs2lZIyrAdU18IxMA5orBPn9qLbOdu55gXSTNZOhyRJ8ugtbUAejsK7OL0boJy0CCHPAdVRXm01Mwk8tZ9RQ==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-linux-arm-gnueabihf": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.0.9.tgz",
- "integrity": "sha512-/ni0p9DBvATUML9RQ1ycQuf05uOYKdzA6iI8+eRsARjpGbFVUFbge7XPzlj9g2Q9YWgoN8CSjFGnKRlyky5uHA==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-linux-arm64-gnu": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.0.9.tgz",
- "integrity": "sha512-AphxilJDf95rUxJDHgM9Ww1DaYXZWqTvoKwXeej/0SgSvICcRZrLaFDrkojdXz0Rxr4igX2OdYR1S4/Hj1jWOQ==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-linux-arm64-musl": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.0.9.tgz",
- "integrity": "sha512-K5jbvNNzF3mRjWmPdxP5Bg87i7FHivfBj/L0KJlxpkLSC8sffBJDmB6jtMnI7wiPj9J6vmLkbGtSosln78xAlQ==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-linux-x64-gnu": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.0.9.tgz",
- "integrity": "sha512-bJZ9bkMkQzsY+UyWezEZ77GWQ4TzwKeXdayX3U3+aEkL8k5C6eKBXlidWdrhu0teLmaUXIyWerWrLnJzwGXdfw==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-linux-x64-musl": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.0.9.tgz",
- "integrity": "sha512-SR9p0R+v1T32DTXPVAXZw31pmJAkSDotC6Afy+mfC0xrEL3pp95R8sGXYAAUCEPkQp0MEeUOVy2LrToe92X7hQ==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-win32-arm64-msvc": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.0.9.tgz",
- "integrity": "sha512-mzQ1A8vfHhJrvEy5KJZGZWEByXthyKfWofvFaf+oo/5nJl/0Bz1ODP2ajSmbLG++77Eo2AROgbm9pkW1ucvG2A==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-win32-ia32-msvc": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.0.9.tgz",
- "integrity": "sha512-MpD2vj1zjo1u3J3wiz3pEKse19Etz+P0GL6XfQkB/9a84vJQ1JWMaWBjmIdivzZv718Il2pRSSx8hymwPfguYQ==",
- "cpu": [
- "ia32"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "apps/temp-docs/node_modules/@next/swc-win32-x64-msvc": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.0.9.tgz",
- "integrity": "sha512-1c/sxp/4Qz4F6rCxiYqAnrmghCOFt5hHZ9Kd+rXFW5Mqev4C4XDOUMHdBH55HgnJZqngYhOE0r/XNkCtsIojig==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
"apps/temp-docs/node_modules/@radix-ui/primitive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz",
@@ -812,55 +642,6 @@
"dev": true,
"license": "MIT"
},
- "apps/temp-docs/node_modules/next": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/next/-/next-12.0.9.tgz",
- "integrity": "sha512-omfYqoR/DvbdOIJ6SS1unKJ4mGIxUPs0RPa7wr/Mft22OCKgJhuG+aI9KFYi5ZJBwoFQk1vqaMKpWz5qr+dN0Q==",
- "dependencies": {
- "@next/env": "12.0.9",
- "caniuse-lite": "^1.0.30001283",
- "postcss": "8.4.5",
- "styled-jsx": "5.0.0",
- "use-subscription": "1.5.1"
- },
- "bin": {
- "next": "dist/bin/next"
- },
- "engines": {
- "node": ">=12.22.0"
- },
- "optionalDependencies": {
- "@next/swc-android-arm64": "12.0.9",
- "@next/swc-darwin-arm64": "12.0.9",
- "@next/swc-darwin-x64": "12.0.9",
- "@next/swc-linux-arm-gnueabihf": "12.0.9",
- "@next/swc-linux-arm64-gnu": "12.0.9",
- "@next/swc-linux-arm64-musl": "12.0.9",
- "@next/swc-linux-x64-gnu": "12.0.9",
- "@next/swc-linux-x64-musl": "12.0.9",
- "@next/swc-win32-arm64-msvc": "12.0.9",
- "@next/swc-win32-ia32-msvc": "12.0.9",
- "@next/swc-win32-x64-msvc": "12.0.9"
- },
- "peerDependencies": {
- "fibers": ">= 3.1.0",
- "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0",
- "react": "^17.0.2 || ^18.0.0-0",
- "react-dom": "^17.0.2 || ^18.0.0-0",
- "sass": "^1.3.0"
- },
- "peerDependenciesMeta": {
- "fibers": {
- "optional": true
- },
- "node-sass": {
- "optional": true
- },
- "sass": {
- "optional": true
- }
- }
- },
"apps/temp-docs/node_modules/next-mdx-remote": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/next-mdx-remote/-/next-mdx-remote-3.0.8.tgz",
@@ -897,23 +678,6 @@
"node": ">= 0.8.0"
}
},
- "apps/temp-docs/node_modules/postcss": {
- "version": "8.4.5",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz",
- "integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==",
- "dependencies": {
- "nanoid": "^3.1.30",
- "picocolors": "^1.0.0",
- "source-map-js": "^1.0.1"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- }
- },
"apps/temp-docs/node_modules/supports-color": {
"version": "7.2.0",
"dev": true,
@@ -36662,6 +36426,11 @@
"node": ">=10"
}
},
+ "node_modules/yup-password": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/yup-password/-/yup-password-0.2.2.tgz",
+ "integrity": "sha512-2PHfqGWtbXg4OfDV7VKFIb3hyEaYgTYpEORnFqgGAYqzENWmGzWMoeGvJg2Ohmq6maTRxhJzLZpNTITrqlZTrA=="
+ },
"node_modules/zen-observable": {
"version": "0.8.15",
"resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz",
@@ -36897,6 +36666,7 @@
"uniforms-bridge-json-schema": "^3.6.2",
"uuid": "^8.3.2",
"yup": "^0.32.11",
+ "yup-password": "^0.2.2",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
@@ -61503,6 +61273,7 @@
"uniforms-bridge-json-schema": "^3.6.2",
"uuid": "^8.3.2",
"yup": "^0.32.11",
+ "yup-password": "*",
"zxcvbn": "^4.4.2"
},
"dependencies": {
@@ -62194,7 +61965,7 @@
"lodash": "^4.17.21",
"markdown-toc": "^1.2.0",
"minimist": "^1.2.6",
- "next": "12.0.9",
+ "next": "12.1.0",
"next-compose-plugins": "^2.2.1",
"next-mdx-remote": "^3.0.8",
"next-themes": "0.0.15",
@@ -62270,77 +62041,6 @@
"version": "1.6.22",
"requires": {}
},
- "@next/env": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/env/-/env-12.0.9.tgz",
- "integrity": "sha512-oBlkyDop0Stf7MPIzETGv5r0YT/G/weBrknoPOUTaa5qwOeGjuy6gsOVc/SBtrBkOoBmRpD+fFhQJPvmo1mS+g=="
- },
- "@next/swc-android-arm64": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.0.9.tgz",
- "integrity": "sha512-aVqgsEn5plmUH2X58sjzhHsH/6majucWTMaaBEs7hHO2+GCwCZc7zaLH4XCBMKPES9Yaja8/pYUbvZQE9DqgFw==",
- "optional": true
- },
- "@next/swc-darwin-arm64": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.0.9.tgz",
- "integrity": "sha512-uAgRKm4a2nVdyBiPPJokvmDD1saugOvxljz9ld2ih0CCg5S9vBhqaj3kPGCQBj9hSu3q+Lng2CHnQqG3ga1jzA==",
- "optional": true
- },
- "@next/swc-darwin-x64": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.0.9.tgz",
- "integrity": "sha512-fDOs2lZIyrAdU18IxMA5orBPn9qLbOdu55gXSTNZOhyRJ8ugtbUAejsK7OL0boJy0CCHPAdVRXm01Mwk8tZ9RQ==",
- "optional": true
- },
- "@next/swc-linux-arm-gnueabihf": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.0.9.tgz",
- "integrity": "sha512-/ni0p9DBvATUML9RQ1ycQuf05uOYKdzA6iI8+eRsARjpGbFVUFbge7XPzlj9g2Q9YWgoN8CSjFGnKRlyky5uHA==",
- "optional": true
- },
- "@next/swc-linux-arm64-gnu": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.0.9.tgz",
- "integrity": "sha512-AphxilJDf95rUxJDHgM9Ww1DaYXZWqTvoKwXeej/0SgSvICcRZrLaFDrkojdXz0Rxr4igX2OdYR1S4/Hj1jWOQ==",
- "optional": true
- },
- "@next/swc-linux-arm64-musl": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.0.9.tgz",
- "integrity": "sha512-K5jbvNNzF3mRjWmPdxP5Bg87i7FHivfBj/L0KJlxpkLSC8sffBJDmB6jtMnI7wiPj9J6vmLkbGtSosln78xAlQ==",
- "optional": true
- },
- "@next/swc-linux-x64-gnu": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.0.9.tgz",
- "integrity": "sha512-bJZ9bkMkQzsY+UyWezEZ77GWQ4TzwKeXdayX3U3+aEkL8k5C6eKBXlidWdrhu0teLmaUXIyWerWrLnJzwGXdfw==",
- "optional": true
- },
- "@next/swc-linux-x64-musl": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.0.9.tgz",
- "integrity": "sha512-SR9p0R+v1T32DTXPVAXZw31pmJAkSDotC6Afy+mfC0xrEL3pp95R8sGXYAAUCEPkQp0MEeUOVy2LrToe92X7hQ==",
- "optional": true
- },
- "@next/swc-win32-arm64-msvc": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.0.9.tgz",
- "integrity": "sha512-mzQ1A8vfHhJrvEy5KJZGZWEByXthyKfWofvFaf+oo/5nJl/0Bz1ODP2ajSmbLG++77Eo2AROgbm9pkW1ucvG2A==",
- "optional": true
- },
- "@next/swc-win32-ia32-msvc": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.0.9.tgz",
- "integrity": "sha512-MpD2vj1zjo1u3J3wiz3pEKse19Etz+P0GL6XfQkB/9a84vJQ1JWMaWBjmIdivzZv718Il2pRSSx8hymwPfguYQ==",
- "optional": true
- },
- "@next/swc-win32-x64-msvc": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.0.9.tgz",
- "integrity": "sha512-1c/sxp/4Qz4F6rCxiYqAnrmghCOFt5hHZ9Kd+rXFW5Mqev4C4XDOUMHdBH55HgnJZqngYhOE0r/XNkCtsIojig==",
- "optional": true
- },
"@radix-ui/primitive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz",
@@ -62677,29 +62377,6 @@
"version": "0.4.1",
"dev": true
},
- "next": {
- "version": "12.0.9",
- "resolved": "https://registry.npmjs.org/next/-/next-12.0.9.tgz",
- "integrity": "sha512-omfYqoR/DvbdOIJ6SS1unKJ4mGIxUPs0RPa7wr/Mft22OCKgJhuG+aI9KFYi5ZJBwoFQk1vqaMKpWz5qr+dN0Q==",
- "requires": {
- "@next/env": "12.0.9",
- "@next/swc-android-arm64": "12.0.9",
- "@next/swc-darwin-arm64": "12.0.9",
- "@next/swc-darwin-x64": "12.0.9",
- "@next/swc-linux-arm-gnueabihf": "12.0.9",
- "@next/swc-linux-arm64-gnu": "12.0.9",
- "@next/swc-linux-arm64-musl": "12.0.9",
- "@next/swc-linux-x64-gnu": "12.0.9",
- "@next/swc-linux-x64-musl": "12.0.9",
- "@next/swc-win32-arm64-msvc": "12.0.9",
- "@next/swc-win32-ia32-msvc": "12.0.9",
- "@next/swc-win32-x64-msvc": "12.0.9",
- "caniuse-lite": "^1.0.30001283",
- "postcss": "8.4.5",
- "styled-jsx": "5.0.0",
- "use-subscription": "1.5.1"
- }
- },
"next-mdx-remote": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/next-mdx-remote/-/next-mdx-remote-3.0.8.tgz",
@@ -62727,16 +62404,6 @@
"word-wrap": "^1.2.3"
}
},
- "postcss": {
- "version": "8.4.5",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz",
- "integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==",
- "requires": {
- "nanoid": "^3.1.30",
- "picocolors": "^1.0.0",
- "source-map-js": "^1.0.1"
- }
- },
"supports-color": {
"version": "7.2.0",
"dev": true,
@@ -65697,6 +65364,11 @@
"toposort": "^2.0.2"
}
},
+ "yup-password": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/yup-password/-/yup-password-0.2.2.tgz",
+ "integrity": "sha512-2PHfqGWtbXg4OfDV7VKFIb3hyEaYgTYpEORnFqgGAYqzENWmGzWMoeGvJg2Ohmq6maTRxhJzLZpNTITrqlZTrA=="
+ },
"zen-observable": {
"version": "0.8.15",
"resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz",
diff --git a/studio/components/interfaces/SignIn/SignUpForm.tsx b/studio/components/interfaces/SignIn/SignUpForm.tsx
index 283b02409ed..a3ca95be94f 100644
--- a/studio/components/interfaces/SignIn/SignUpForm.tsx
+++ b/studio/components/interfaces/SignIn/SignUpForm.tsx
@@ -5,13 +5,15 @@ import { API_URL } from 'lib/constants'
import { useRouter } from 'next/router'
import { useRef, useState } from 'react'
import { Button, Form, Input } from 'ui'
-import { object, string } from 'yup'
+import * as yup from 'yup'
+import YupPassword from 'yup-password'
-const signUpSchema = object({
- email: string().email('Must be a valid email').required('Email is required'),
- password: string()
- .required('Password is required')
- .min(8, 'Password must be at least 8 characters long'),
+// extend yup with password validation
+YupPassword(yup)
+
+const signUpSchema = yup.object({
+ email: yup.string().email().required().label('Email'),
+ password: yup.string().password().required().label('Password'),
})
const SignUpForm = () => {
diff --git a/studio/package.json b/studio/package.json
index 2b27b9535a5..0641b4876b3 100644
--- a/studio/package.json
+++ b/studio/package.json
@@ -86,6 +86,7 @@
"uniforms-bridge-json-schema": "^3.6.2",
"uuid": "^8.3.2",
"yup": "^0.32.11",
+ "yup-password": "^0.2.2",
"zxcvbn": "^4.4.2"
},
"devDependencies": {