🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
password reset (#277)
Bill Yang4c450fdedd30
diff --git a/client/package-lock.json b/client/package-lock.jsonindex 1285b9df1..3ccfeeeaf 100644--- a/client/package-lock.json+++ b/client/package-lock.json@@ -1,12 +1,12 @@{"name": "client",- "version": "0.1.4",+ "version": "0.2.0","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "client",- "version": "0.1.4",+ "version": "0.2.0","dependencies": {"@better-auth/stripe": "1.2.7","@hookform/resolvers": "5.0.1",@@ -51,6 +51,7 @@"deps": "1.0.0","framer-motion": "12.11.0","geojson": "0.5.0",+ "input-otp": "^1.4.2","jotai": "2.12.4","ldrs": "1.1.7","leaflet": "1.9.4",@@ -94,6 +95,7 @@"version": "5.2.0","resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz","integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",+ "dev": true,"license": "MIT","engines": {"node": ">=10"@@ -1698,6 +1700,7 @@"version": "8.0.2","resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz","integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",+ "dev": true,"license": "ISC","dependencies": {"string-width": "^5.1.2",@@ -1715,6 +1718,7 @@"version": "6.1.0","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz","integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",+ "dev": true,"license": "MIT","engines": {"node": ">=12"@@ -1727,12 +1731,14 @@"version": "9.2.2","resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz","integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",+ "dev": true,"license": "MIT"},"node_modules/@isaacs/cliui/node_modules/string-width": {"version": "5.1.2","resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz","integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",+ "dev": true,"license": "MIT","dependencies": {"eastasianwidth": "^0.2.0",@@ -1750,6 +1756,7 @@"version": "7.1.0","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz","integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",+ "dev": true,"license": "MIT","dependencies": {"ansi-regex": "^6.0.1"@@ -2043,30 +2050,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/annotations/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/annotations/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/axes": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/axes/-/axes-0.96.0.tgz",@@ -2147,30 +2130,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/axes/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/axes/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/bar": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/bar/-/bar-0.96.0.tgz",@@ -2258,30 +2217,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/bar/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/bar/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/calendar": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/calendar/-/calendar-0.96.0.tgz",@@ -2424,30 +2359,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/core/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/core/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/legends": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/legends/-/legends-0.96.0.tgz",@@ -2548,30 +2459,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/line/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/line/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/scales": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/scales/-/scales-0.96.0.tgz",@@ -2669,30 +2556,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/text/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/text/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/theming": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/theming/-/theming-0.96.0.tgz",@@ -2779,30 +2642,6 @@"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}},- "node_modules/@nivo/tooltip/node_modules/react-dom": {- "version": "18.3.1",- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "peerDependencies": {- "react": "^18.3.1"- }- },- "node_modules/@nivo/tooltip/node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "license": "MIT",- "peer": true,- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/@nivo/voronoi": {"version": "0.96.0","resolved": "https://registry.npmjs.org/@nivo/voronoi/-/voronoi-0.96.0.tgz",@@ -2966,6 +2805,7 @@"version": "0.11.0","resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz","integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",+ "dev": true,"license": "MIT","optional": true,"engines": {@@ -5158,6 +4998,7 @@"version": "19.1.4","resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.4.tgz","integrity": "sha512-EB1yiiYdvySuIITtD5lhW4yPyJ31RkJkkDw794LaQYrxCSaQV/47y5o1FMC4zF9ZyjUjzJMZwbovEnT5yHTW6g==",+ "dev": true,"license": "MIT","dependencies": {"csstype": "^3.0.2"@@ -5167,6 +5008,7 @@"version": "19.1.5","resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.5.tgz","integrity": "sha512-CMCjrWucUBZvohgZxkjd6S9h0nZxXjzus6yDfUb+xLxYM7VvjKNH1tQrE9GWLql1XoOP4/Ds3bwFqShHUYraGg==",+ "dev": true,"license": "MIT","peerDependencies": {"@types/react": "^19.0.0"@@ -5304,12 +5146,14 @@"version": "1.3.0","resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz","integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",+ "dev": true,"license": "MIT"},"node_modules/anymatch": {"version": "3.1.3","resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz","integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",+ "dev": true,"license": "ISC","dependencies": {"normalize-path": "^3.0.0",@@ -5323,6 +5167,7 @@"version": "5.0.2","resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz","integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",+ "dev": true,"license": "MIT"},"node_modules/aria-hidden": {@@ -5453,6 +5298,7 @@"version": "2.3.0","resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz","integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",+ "dev": true,"license": "MIT","engines": {"node": ">=8"@@ -5544,6 +5390,7 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz","integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",+ "dev": true,"license": "MIT","engines": {"node": ">= 6"@@ -5598,6 +5445,7 @@"version": "3.6.0","resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz","integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",+ "dev": true,"license": "MIT","dependencies": {"anymatch": "~3.1.2",@@ -5846,6 +5694,7 @@"version": "3.0.0","resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz","integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",+ "dev": true,"license": "MIT","bin": {"cssesc": "bin/cssesc"@@ -6457,6 +6306,7 @@"version": "1.2.2","resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz","integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",+ "dev": true,"license": "Apache-2.0"},"node_modules/dir-glob": {@@ -6475,6 +6325,7 @@"version": "1.1.3","resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz","integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",+ "dev": true,"license": "MIT"},"node_modules/dom-helpers": {@@ -6519,6 +6370,7 @@"version": "0.2.0","resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz","integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",+ "dev": true,"license": "MIT"},"node_modules/emoji-regex": {@@ -6707,6 +6559,7 @@"version": "3.3.1","resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz","integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",+ "dev": true,"license": "ISC","dependencies": {"cross-spawn": "^7.0.6",@@ -6723,6 +6576,7 @@"version": "4.1.0","resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz","integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",+ "dev": true,"license": "ISC","engines": {"node": ">=14"@@ -6777,6 +6631,7 @@"version": "2.3.3","resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz","integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",+ "dev": true,"hasInstallScript": true,"license": "MIT","optional": true,@@ -7092,6 +6947,15 @@"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==","license": "ISC"},+ "node_modules/input-otp": {+ "version": "1.4.2",+ "resolved": "https://registry.npmjs.org/input-otp/-/input-otp-1.4.2.tgz",+ "integrity": "sha512-l3jWwYNvrEa6NTCt7BECfCm48GvwuZzkoeG3gBL2w4CHeOXW3eKFmf9UNYkNfYc3mxMrthMnxjIE07MT0zLBQA==",+ "peerDependencies": {+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc"+ }+ },"node_modules/internmap": {"version": "2.0.3","resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz",@@ -7111,6 +6975,7 @@"version": "2.1.0","resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz","integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",+ "dev": true,"license": "MIT","dependencies": {"binary-extensions": "^2.0.0"@@ -7240,6 +7105,7 @@"version": "3.4.3","resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz","integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",+ "dev": true,"license": "BlueOak-1.0.0","dependencies": {"@isaacs/cliui": "^8.0.2"@@ -7264,6 +7130,7 @@"version": "1.21.7","resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz","integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",+ "dev": true,"license": "MIT","bin": {"jiti": "bin/jiti.js"@@ -7369,6 +7236,7 @@"version": "2.1.0","resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz","integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",+ "dev": true,"license": "MIT","engines": {"node": ">=10"@@ -7408,6 +7276,7 @@"version": "10.4.3","resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz","integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",+ "dev": true,"license": "ISC"},"node_modules/lucide-react": {@@ -7521,6 +7390,7 @@"version": "7.1.2","resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz","integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",+ "dev": true,"license": "ISC","engines": {"node": ">=16 || 14 >=14.17"@@ -7551,6 +7421,7 @@"version": "2.7.0","resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz","integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",+ "dev": true,"license": "MIT","dependencies": {"any-promise": "^1.0.0",@@ -7699,6 +7570,7 @@"version": "3.0.0","resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz","integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",+ "dev": true,"license": "MIT","engines": {"node": ">=0.10.0"@@ -7738,6 +7610,7 @@"version": "3.0.0","resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz","integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",+ "dev": true,"license": "MIT","engines": {"node": ">= 6"@@ -7783,6 +7656,7 @@"version": "1.0.1","resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz","integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",+ "dev": true,"license": "BlueOak-1.0.0"},"node_modules/parent-module": {@@ -7843,6 +7717,7 @@"version": "1.11.1","resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz","integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",+ "dev": true,"license": "BlueOak-1.0.0","dependencies": {"lru-cache": "^10.2.0",@@ -7886,6 +7761,7 @@"version": "2.3.0","resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz","integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",+ "dev": true,"license": "MIT","engines": {"node": ">=0.10.0"@@ -7895,6 +7771,7 @@"version": "4.0.7","resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz","integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",+ "dev": true,"license": "MIT","engines": {"node": ">= 6"@@ -7925,6 +7802,7 @@"version": "8.5.3","resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz","integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",+ "dev": true,"funding": [{"type": "opencollective",@@ -7953,6 +7831,7 @@"version": "15.1.0","resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz","integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",+ "dev": true,"license": "MIT","dependencies": {"postcss-value-parser": "^4.0.0",@@ -7970,6 +7849,7 @@"version": "4.0.1","resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz","integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==",+ "dev": true,"license": "MIT","dependencies": {"camelcase-css": "^2.0.1"@@ -7989,6 +7869,7 @@"version": "6.2.0","resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz","integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",+ "dev": true,"funding": [{"type": "opencollective",@@ -8014,6 +7895,7 @@"version": "6.1.2","resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz","integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",+ "dev": true,"license": "MIT","dependencies": {"cssesc": "^3.0.0",@@ -8027,6 +7909,7 @@"version": "4.2.0","resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz","integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",+ "dev": true,"license": "MIT"},"node_modules/potpack": {@@ -8459,6 +8342,7 @@"version": "1.0.0","resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz","integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",+ "dev": true,"license": "MIT","dependencies": {"pify": "^2.3.0"@@ -8483,6 +8367,7 @@"version": "3.6.0","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz","integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",+ "dev": true,"license": "MIT","dependencies": {"picomatch": "^2.2.1"@@ -8921,6 +8806,7 @@"version": "4.2.3","resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz","integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "dev": true,"license": "MIT","dependencies": {"emoji-regex": "^8.0.0",@@ -8948,6 +8834,7 @@"version": "6.0.1","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz","integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "dev": true,"license": "MIT","dependencies": {"ansi-regex": "^5.0.1"@@ -8998,6 +8885,7 @@"version": "3.35.0","resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz","integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==",+ "dev": true,"license": "MIT","dependencies": {"@jridgewell/gen-mapping": "^0.3.2",@@ -9020,6 +8908,7 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz","integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",+ "dev": true,"license": "MIT","dependencies": {"balanced-match": "^1.0.0"@@ -9029,6 +8918,7 @@"version": "4.1.1","resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz","integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",+ "dev": true,"license": "MIT","engines": {"node": ">= 6"@@ -9038,6 +8928,7 @@"version": "10.4.5","resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz","integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",+ "dev": true,"license": "ISC","dependencies": {"foreground-child": "^3.1.0",@@ -9058,6 +8949,7 @@"version": "9.0.5","resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz","integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",+ "dev": true,"license": "ISC","dependencies": {"brace-expansion": "^2.0.1"@@ -9116,6 +9008,7 @@"version": "3.4.1","resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz","integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==",+ "dev": true,"license": "MIT","dependencies": {"@alloc/quick-lru": "^5.2.0",@@ -9162,6 +9055,7 @@"version": "6.0.2","resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz","integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",+ "dev": true,"license": "ISC","dependencies": {"is-glob": "^4.0.3"@@ -9174,6 +9068,7 @@"version": "4.0.2","resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz","integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==",+ "dev": true,"funding": [{"type": "opencollective",@@ -9209,6 +9104,7 @@"version": "3.1.3","resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz","integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",+ "dev": true,"license": "MIT","engines": {"node": ">=14"@@ -9221,6 +9117,7 @@"version": "2.7.1","resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz","integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",+ "dev": true,"license": "ISC","bin": {"yaml": "bin.mjs"@@ -9272,6 +9169,7 @@"version": "3.3.1","resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz","integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",+ "dev": true,"license": "MIT","dependencies": {"any-promise": "^1.0.0"@@ -9281,6 +9179,7 @@"version": "1.6.0","resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz","integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",+ "dev": true,"license": "MIT","dependencies": {"thenify": ">= 3.1.0 < 4"@@ -9484,6 +9383,7 @@"version": "0.1.13","resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz","integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",+ "dev": true,"license": "Apache-2.0"},"node_modules/tslib": {@@ -9645,6 +9545,7 @@"version": "1.0.2","resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz","integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",+ "dev": true,"license": "MIT"},"node_modules/utility-types": {@@ -9696,6 +9597,7 @@"version": "8.1.0","resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz","integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",+ "dev": true,"license": "MIT","dependencies": {"ansi-styles": "^6.1.0",@@ -9714,6 +9616,7 @@"version": "7.0.0","resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz","integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",+ "dev": true,"license": "MIT","dependencies": {"ansi-styles": "^4.0.0",@@ -9731,6 +9634,7 @@"version": "6.1.0","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz","integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",+ "dev": true,"license": "MIT","engines": {"node": ">=12"@@ -9743,6 +9647,7 @@"version": "6.2.1","resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz","integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",+ "dev": true,"license": "MIT","engines": {"node": ">=12"@@ -9755,12 +9660,14 @@"version": "9.2.2","resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz","integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",+ "dev": true,"license": "MIT"},"node_modules/wrap-ansi/node_modules/string-width": {"version": "5.1.2","resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz","integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",+ "dev": true,"license": "MIT","dependencies": {"eastasianwidth": "^0.2.0",@@ -9778,6 +9685,7 @@"version": "7.1.0","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz","integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",+ "dev": true,"license": "MIT","dependencies": {"ansi-regex": "^6.0.1"diff --git a/client/package.json b/client/package.jsonindex 10dfd7b04..c5b863f52 100644--- a/client/package.json+++ b/client/package.json@@ -52,6 +52,7 @@"deps": "1.0.0","framer-motion": "12.11.0","geojson": "0.5.0",+ "input-otp": "^1.4.2","jotai": "2.12.4","ldrs": "1.1.7","leaflet": "1.9.4",diff --git a/client/src/app/layout.tsx b/client/src/app/layout.tsxindex 43069ec33..f2f1490d8 100644--- a/client/src/app/layout.tsx+++ b/client/src/app/layout.tsx@@ -15,7 +15,7 @@ import { useStopImpersonation } from "@/hooks/useStopImpersonation";const inter = Inter({ subsets: ["latin"] });-const publicRoutes = ["/login", "/signup", "/invitation"];+const publicRoutes = ["/login", "/signup", "/invitation", "/reset-password"];// Helper function to check if a site is publicasync function checkIfSiteIsPublic(siteId: string): Promise<boolean> {@@ -52,17 +52,7 @@ export default function RootLayout({const potentialSiteId = pathSegments[0];// Don't check for public site status on obvious non-site paths- if (- !publicRoutes.includes(`/${potentialSiteId}`) &&- ![- "_next",- "api",- "settings",- "subscribe",- "invitation",- "admin",- ].includes(potentialSiteId)- ) {+ if (!isNaN(Number(potentialSiteId))) {setIsCheckingPublic(true);checkIfSiteIsPublic(potentialSiteId).then((isPublic) => {diff --git a/client/src/app/login/page.tsx b/client/src/app/login/page.tsxindex 7fefe83cd..475cebb2f 100644--- a/client/src/app/login/page.tsx+++ b/client/src/app/login/page.tsx@@ -79,6 +79,14 @@ export default function Page() {requiredvalue={password}onChange={(e) => setPassword(e.target.value)}+ rightElement={+ <Link+ href="/reset-password"+ className="text-xs text-muted-foreground hover:text-primary"+ >+ Forgot password?+ </Link>+ }/><AuthButton isLoading={isLoading} loadingText="Logging in...">diff --git a/client/src/app/reset-password/page.tsx b/client/src/app/reset-password/page.tsxnew file mode 100644index 000000000..6ed59f2e6--- /dev/null+++ b/client/src/app/reset-password/page.tsx@@ -0,0 +1,196 @@+"use client";++import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";+import Image from "next/image";+import Link from "next/link";+import { useRouter } from "next/navigation";+import { useState } from "react";+import { useSetPageTitle } from "../../hooks/useSetPageTitle";+import { authClient } from "../../lib/auth";+import { AuthInput } from "@/components/auth/AuthInput";+import { AuthButton } from "@/components/auth/AuthButton";+import { AuthError } from "@/components/auth/AuthError";++export default function ResetPasswordPage() {+ useSetPageTitle("Rybbit · Reset Password");+ const [email, setEmail] = useState("");+ const [isLoading, setIsLoading] = useState(false);+ const [error, setError] = useState<string>();+ const [otpSent, setOtpSent] = useState(false);+ const [otp, setOtp] = useState("");+ const [newPassword, setNewPassword] = useState("");+ const [resetSuccess, setResetSuccess] = useState(false);+ const router = useRouter();++ const handleRequestOTP = async (e: React.FormEvent) => {+ e.preventDefault();+ setIsLoading(true);+ setError("");++ try {+ const { data, error } = await authClient.emailOtp.sendVerificationOtp({+ email,+ type: "forget-password",+ });++ if (error) {+ setError(error.message);+ } else {+ setOtpSent(true);+ }+ } catch (error) {+ setError(String(error));+ }++ setIsLoading(false);+ };++ const handleResetPassword = async (e: React.FormEvent) => {+ e.preventDefault();+ setIsLoading(true);+ setError("");++ try {+ // Simple validation for password length+ if (newPassword.length < 8) {+ setError("Password must be at least 8 characters long");+ setIsLoading(false);+ return;+ }++ const { data, error } = await authClient.emailOtp.resetPassword({+ email,+ otp,+ password: newPassword,+ });++ if (error) {+ setError(error.message);+ } else {+ setResetSuccess(true);+ setTimeout(() => {+ router.push("/login");+ }, 3000);+ }+ } catch (error) {+ setError(String(error));+ }++ setIsLoading(false);+ };++ return (+ <div className="flex justify-center items-center h-screen w-full p-4">+ <Card className="w-full max-w-sm p-1">+ <CardHeader>+ <Image src="/rybbit.png" alt="Rybbit" width={32} height={32} />+ <CardTitle className="text-2xl flex justify-center">+ {resetSuccess+ ? "Password Reset Successful"+ : otpSent+ ? "Enter OTP Code"+ : "Reset Password"}+ </CardTitle>+ </CardHeader>+ <CardContent>+ {resetSuccess ? (+ <div className="flex flex-col items-center space-y-6 py-4">+ <div className="h-20 w-20 rounded-full bg-green-900/20 flex items-center justify-center border-2 border-green-500 text-green-500">+ <span className="text-3xl font-bold">✓</span>+ </div>+ <div className="text-center space-y-2">+ <h3 className="text-xl font-medium text-green-500">Success!</h3>+ <p className="text-muted-foreground">+ Your password has been reset successfully.+ </p>+ </div>+ <div className="w-full rounded-md bg-neutral-800/30 p-3 mt-4">+ <div className="flex justify-center">+ <p className="text-sm text-muted-foreground">+ Redirecting to login page...+ </p>+ </div>+ </div>+ </div>+ ) : otpSent ? (+ <form onSubmit={handleResetPassword} className="space-y-4">+ <p className="text-sm text-muted-foreground">+ We've sent a verification code to {email}. Please enter the code+ below along with your new password.+ </p>++ <AuthInput+ id="otp"+ label="Verification Code"+ type="text"+ placeholder="000000"+ required+ value={otp}+ onChange={(e) => setOtp(e.target.value)}+ />++ <AuthInput+ id="new-password"+ label="New Password"+ type="password"+ placeholder="••••••••"+ required+ value={newPassword}+ onChange={(e) => setNewPassword(e.target.value)}+ />++ <AuthButton+ isLoading={isLoading}+ loadingText="Resetting password..."+ >+ Reset Password+ </AuthButton>++ <AuthError error={error} title="Error Resetting Password" />++ <div className="text-center text-sm">+ <button+ type="button"+ onClick={() => setOtpSent(false)}+ className="text-xs text-muted-foreground hover:text-primary"+ >+ Use a different email+ </button>+ </div>+ </form>+ ) : (+ <form onSubmit={handleRequestOTP} className="space-y-4">+ <p className="text-sm text-muted-foreground">+ Enter your email address and we'll send you a verification code+ to reset your password.+ </p>++ <AuthInput+ id="email"+ label="Email"+ type="email"+ placeholder="[email protected]"+ required+ value={email}+ onChange={(e) => setEmail(e.target.value)}+ />++ <AuthButton isLoading={isLoading} loadingText="Sending code...">+ Send Verification Code+ </AuthButton>++ <AuthError error={error} title="Error Sending Code" />++ <div className="text-center text-sm">+ Remember your password?{" "}+ <Link href="/login" className="underline">+ Sign in+ </Link>+ </div>+ </form>+ )}+ </CardContent>+ </Card>+ </div>+ );+}diff --git a/client/src/components/auth/AuthInput.tsx b/client/src/components/auth/AuthInput.tsxindex cad803623..b668b2a2d 100644--- a/client/src/components/auth/AuthInput.tsx+++ b/client/src/components/auth/AuthInput.tsx@@ -2,6 +2,7 @@import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";+import { ReactNode } from "react";interface AuthInputProps {id: string;@@ -12,6 +13,7 @@ interface AuthInputProps {onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;required?: boolean;className?: string;+ rightElement?: ReactNode;}export function AuthInput({@@ -23,10 +25,14 @@ export function AuthInput({onChange,required = false,className = "",+ rightElement,}: AuthInputProps) {return (<div className={`grid gap-2 ${className}`}>- <Label htmlFor={id}>{label}</Label>+ <div className="flex justify-between items-center">+ <Label htmlFor={id}>{label}</Label>+ {rightElement && <div>{rightElement}</div>}+ </div><Inputid={id}type={type}@@ -35,6 +41,7 @@ export function AuthInput({onChange={onChange}required={required}className="h-10 transition-all bg-neutral-800/50 border-neutral-700"+ minLength={type === "password" ? 8 : undefined}/></div>);diff --git a/client/src/components/ui/input-otp.tsx b/client/src/components/ui/input-otp.tsxnew file mode 100644index 000000000..fb5925d85--- /dev/null+++ b/client/src/components/ui/input-otp.tsx@@ -0,0 +1,71 @@+"use client"++import * as React from "react"+import { OTPInput, OTPInputContext } from "input-otp"+import { Minus } from "lucide-react"++import { cn } from "@/lib/utils"++const InputOTP = React.forwardRef<+ React.ElementRef<typeof OTPInput>,+ React.ComponentPropsWithoutRef<typeof OTPInput>+>(({ className, containerClassName, ...props }, ref) => (+ <OTPInput+ ref={ref}+ containerClassName={cn(+ "flex items-center gap-2 has-[:disabled]:opacity-50",+ containerClassName+ )}+ className={cn("disabled:cursor-not-allowed", className)}+ {...props}+ />+))+InputOTP.displayName = "InputOTP"++const InputOTPGroup = React.forwardRef<+ React.ElementRef<"div">,+ React.ComponentPropsWithoutRef<"div">+>(({ className, ...props }, ref) => (+ <div ref={ref} className={cn("flex items-center", className)} {...props} />+))+InputOTPGroup.displayName = "InputOTPGroup"++const InputOTPSlot = React.forwardRef<+ React.ElementRef<"div">,+ React.ComponentPropsWithoutRef<"div"> & { index: number }+>(({ index, className, ...props }, ref) => {+ const inputOTPContext = React.useContext(OTPInputContext)+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]++ return (+ <div+ ref={ref}+ className={cn(+ "relative flex h-9 w-9 items-center justify-center border-y border-r border-neutral-200 text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800",+ isActive && "z-10 ring-1 ring-neutral-950 dark:ring-neutral-300",+ className+ )}+ {...props}+ >+ {char}+ {hasFakeCaret && (+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">+ <div className="h-4 w-px animate-caret-blink bg-neutral-950 duration-1000 dark:bg-neutral-50" />+ </div>+ )}+ </div>+ )+})+InputOTPSlot.displayName = "InputOTPSlot"++const InputOTPSeparator = React.forwardRef<+ React.ElementRef<"div">,+ React.ComponentPropsWithoutRef<"div">+>(({ ...props }, ref) => (+ <div ref={ref} role="separator" {...props}>+ <Minus />+ </div>+))+InputOTPSeparator.displayName = "InputOTPSeparator"++export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }diff --git a/client/src/lib/auth.ts b/client/src/lib/auth.tsindex 3a8ae9f70..c226394a7 100644--- a/client/src/lib/auth.ts+++ b/client/src/lib/auth.ts@@ -1,9 +1,13 @@-import { adminClient, organizationClient } from "better-auth/client/plugins";+import {+ adminClient,+ organizationClient,+ emailOTPClient,+} from "better-auth/client/plugins";import { createAuthClient } from "better-auth/react";export const authClient = createAuthClient({baseURL: process.env.NEXT_PUBLIC_BACKEND_URL,- plugins: [adminClient(), organizationClient()],+ plugins: [adminClient(), organizationClient(), emailOTPClient()],fetchOptions: {credentials: "include",},diff --git a/client/src/middleware.ts b/client/src/middleware.tsindex 55b996197..3545d5a92 100644--- a/client/src/middleware.ts+++ b/client/src/middleware.ts@@ -35,6 +35,7 @@ export async function middleware(request: NextRequest) {"signup","subscribe","invitation",+ "reset-password","auth","admin","_next",diff --git a/server/src/lib/auth.ts b/server/src/lib/auth.tsindex 9b645b720..513a709ec 100644--- a/server/src/lib/auth.ts+++ b/server/src/lib/auth.ts@@ -1,13 +1,13 @@import { betterAuth } from "better-auth";import { drizzleAdapter } from "better-auth/adapters/drizzle";-import { admin, organization } from "better-auth/plugins";+import { admin, organization, emailOTP } from "better-auth/plugins";import dotenv from "dotenv";import { eq } from "drizzle-orm";import pg from "pg";import { db } from "../db/postgres/postgres.js";import * as schema from "../db/postgres/schema.js";import { DISABLE_SIGNUP } from "./const.js";-import { sendInvitationEmail } from "./resend.js";+import { sendInvitationEmail, sendEmail } from "./resend.js";dotenv.config();@@ -30,6 +30,56 @@ const pluginList = [);},}),+ emailOTP({+ async sendVerificationOTP({ email, otp, type }) {+ let subject, htmlContent;++ if (type === "sign-in") {+ subject = "Your Rybbit Sign-In Code";+ htmlContent = `+ <div style="font-family: sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; background-color: #0c0c0c; color: #e5e5e5;">+ <h2 style="color: #ffffff; font-size: 24px; margin-bottom: 20px;">Your Sign-In Code</h2>+ <p>Here is your one-time password to sign in to Rybbit:</p>+ <div style="background-color: #1a1a1a; padding: 20px; border-radius: 6px; text-align: center; margin: 20px 0; font-size: 28px; letter-spacing: 4px; font-weight: bold; color: #10b981;">+ ${otp}+ </div>+ <p>This code will expire in 5 minutes.</p>+ <p>If you didn't request this code, you can safely ignore this email.</p>+ </div>+ `;+ } else if (type === "email-verification") {+ subject = "Verify Your Email Address";+ htmlContent = `+ <div style="font-family: sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; background-color: #0c0c0c; color: #e5e5e5;">+ <h2 style="color: #ffffff; font-size: 24px; margin-bottom: 20px;">Verify Your Email</h2>+ <p>Here is your verification code for Rybbit:</p>+ <div style="background-color: #1a1a1a; padding: 20px; border-radius: 6px; text-align: center; margin: 20px 0; font-size: 28px; letter-spacing: 4px; font-weight: bold; color: #10b981;">+ ${otp}+ </div>+ <p>This code will expire in 5 minutes.</p>+ <p>If you didn't request this code, you can safely ignore this email.</p>+ </div>+ `;+ } else if (type === "forget-password") {+ subject = "Reset Your Password";+ htmlContent = `+ <div style="font-family: sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; background-color: #0c0c0c; color: #e5e5e5;">+ <h2 style="color: #ffffff; font-size: 24px; margin-bottom: 20px;">Reset Your Password</h2>+ <p>You requested to reset your password for Rybbit. Here is your one-time password:</p>+ <div style="background-color: #1a1a1a; padding: 20px; border-radius: 6px; text-align: center; margin: 20px 0; font-size: 28px; letter-spacing: 4px; font-weight: bold; color: #10b981;">+ ${otp}+ </div>+ <p>This code will expire in 5 minutes.</p>+ <p>If you didn't request this code, you can safely ignore this email.</p>+ </div>+ `;+ }++ if (subject && htmlContent) {+ await sendEmail(email, subject, htmlContent);+ }+ },+ }),];export let auth: AuthType | null = betterAuth({diff --git a/server/src/lib/siteConfig.ts b/server/src/lib/siteConfig.tsindex 5a7b7e031..732f6890e 100644--- a/server/src/lib/siteConfig.ts+++ b/server/src/lib/siteConfig.ts@@ -39,9 +39,6 @@ class SiteConfig {}this.initialized = true;- console.log(- `Loaded ${this.siteConfigMap.size} sites into site config cache`- );} catch (error) {console.error("Error loading site configurations:", error);this.initialized = false;