Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix(auth): prevent duplicate submissions and support session revocation (#3589)

Hoàng Anh Tuấn372a70d2f519
diff --git a/apps/web/locales/af-ZA.po b/apps/web/locales/af-ZA.po
index 10fe20f06..3eea264c1 100644
--- a/apps/web/locales/af-ZA.po
+++ b/apps/web/locales/af-ZA.po
@@ -7507,6 +7507,10 @@ msgstr "Meld aan met jou vingerafdruk, gesig of toestel-PIN"
msgid "Sign out"
msgstr "Meld af"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/am-ET.po b/apps/web/locales/am-ET.po
index be3b32502..fac4b7ec1 100644
--- a/apps/web/locales/am-ET.po
+++ b/apps/web/locales/am-ET.po
@@ -7507,6 +7507,10 @@ msgstr "በእርስዎ የጣት አሻራ፣ ፊት ወይም መሣሪያ ፒ
msgid "Sign out"
msgstr "ውጣ"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ar-SA.po b/apps/web/locales/ar-SA.po
index 6c485bf77..ffc93909e 100644
--- a/apps/web/locales/ar-SA.po
+++ b/apps/web/locales/ar-SA.po
@@ -7507,6 +7507,10 @@ msgstr "قم بتسجيل الدخول باستخدام بصمة الإصبع أ
msgid "Sign out"
msgstr "تسجيل الخروج"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/az-AZ.po b/apps/web/locales/az-AZ.po
index dee1061db..0d22f26db 100644
--- a/apps/web/locales/az-AZ.po
+++ b/apps/web/locales/az-AZ.po
@@ -7507,6 +7507,10 @@ msgstr "Barmaq izi, üz və ya cihaz PIN kodu ilə daxil olun"
msgid "Sign out"
msgstr "Çıxış"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/bg-BG.po b/apps/web/locales/bg-BG.po
index 35d66d9a1..6d1068d0d 100644
--- a/apps/web/locales/bg-BG.po
+++ b/apps/web/locales/bg-BG.po
@@ -7507,6 +7507,10 @@ msgstr "Влезте с вашия пръстов отпечатък, лице
msgid "Sign out"
msgstr "Изход"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/bn-BD.po b/apps/web/locales/bn-BD.po
index b9776d796..5b347073a 100644
--- a/apps/web/locales/bn-BD.po
+++ b/apps/web/locales/bn-BD.po
@@ -7507,6 +7507,10 @@ msgstr "আপনার আঙুলের ছাপ, মুখ বা ডিভ
msgid "Sign out"
msgstr "সাইন আউট"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ca-ES.po b/apps/web/locales/ca-ES.po
index 1f69cadb5..b1c9504d0 100644
--- a/apps/web/locales/ca-ES.po
+++ b/apps/web/locales/ca-ES.po
@@ -7507,6 +7507,10 @@ msgstr "Inicieu la sessió amb l'empremta digital, la cara o el PIN del disposit
msgid "Sign out"
msgstr "Tanca la sessió"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/cs-CZ.po b/apps/web/locales/cs-CZ.po
index 613ee48b7..f94601e28 100644
--- a/apps/web/locales/cs-CZ.po
+++ b/apps/web/locales/cs-CZ.po
@@ -7507,6 +7507,10 @@ msgstr "Přihlaste se pomocí kódu PIN otisku prstu, obličeje nebo zařízení
msgid "Sign out"
msgstr "Odhlásit se"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/da-DK.po b/apps/web/locales/da-DK.po
index b55830e70..bedcf91fa 100644
--- a/apps/web/locales/da-DK.po
+++ b/apps/web/locales/da-DK.po
@@ -7507,6 +7507,10 @@ msgstr "Log ind med dit fingeraftryk, ansigt eller enhedens pinkode"
msgid "Sign out"
msgstr "Log ud"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/de-DE.po b/apps/web/locales/de-DE.po
index e7c327f6c..7eed21355 100644
--- a/apps/web/locales/de-DE.po
+++ b/apps/web/locales/de-DE.po
@@ -7507,6 +7507,10 @@ msgstr "Melden Sie sich mit Ihrem Fingerabdruck, Ihrem Gesicht oder Ihrer Gerät
msgid "Sign out"
msgstr "Abmelden"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/el-GR.po b/apps/web/locales/el-GR.po
index d827afa0f..0c5567f17 100644
--- a/apps/web/locales/el-GR.po
+++ b/apps/web/locales/el-GR.po
@@ -7507,6 +7507,10 @@ msgstr "Συνδεθείτε με το δακτυλικό σας αποτύπω
msgid "Sign out"
msgstr "Αποσύνδεση"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/en-GB.po b/apps/web/locales/en-GB.po
index 7c9aca4eb..d72e2603b 100644
--- a/apps/web/locales/en-GB.po
+++ b/apps/web/locales/en-GB.po
@@ -7507,6 +7507,10 @@ msgstr "Sign in with your fingerprint, face or device PIN"
msgid "Sign out"
msgstr "Sign out"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/en-US.po b/apps/web/locales/en-US.po
index fbdf75606..8fe67568a 100644
--- a/apps/web/locales/en-US.po
+++ b/apps/web/locales/en-US.po
@@ -7502,6 +7502,10 @@ msgstr "Sign in with your fingerprint, face or device PIN"
msgid "Sign out"
msgstr "Sign out"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr "Sign out from all other devices"
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/es-ES.po b/apps/web/locales/es-ES.po
index 22d52a82b..eb290c845 100644
--- a/apps/web/locales/es-ES.po
+++ b/apps/web/locales/es-ES.po
@@ -7507,6 +7507,10 @@ msgstr "Inicie sesión con su huella digital, rostro o PIN del dispositivo"
msgid "Sign out"
msgstr "Cerrar sesión"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/fa-IR.po b/apps/web/locales/fa-IR.po
index 14e6fc63b..6f7850eeb 100644
--- a/apps/web/locales/fa-IR.po
+++ b/apps/web/locales/fa-IR.po
@@ -7507,6 +7507,10 @@ msgstr "با اثر انگشت، صورت یا پین دستگاه خود وار
msgid "Sign out"
msgstr "خروج"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/fi-FI.po b/apps/web/locales/fi-FI.po
index 685935cb7..8ddeeb446 100644
--- a/apps/web/locales/fi-FI.po
+++ b/apps/web/locales/fi-FI.po
@@ -7507,6 +7507,10 @@ msgstr "Kirjaudu sisään sormenjäljelläsi, kasvojesi tai laitteen PIN-koodill
msgid "Sign out"
msgstr "Kirjaudu ulos"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/fr-FR.po b/apps/web/locales/fr-FR.po
index 9c9f6b511..3f0a371d3 100644
--- a/apps/web/locales/fr-FR.po
+++ b/apps/web/locales/fr-FR.po
@@ -7507,6 +7507,10 @@ msgstr "Connectez-vous avec votre empreinte digitale, votre visage ou le code PI
msgid "Sign out"
msgstr "Se déconnecter"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/he-IL.po b/apps/web/locales/he-IL.po
index 521863f2e..c231664a0 100644
--- a/apps/web/locales/he-IL.po
+++ b/apps/web/locales/he-IL.po
@@ -7507,6 +7507,10 @@ msgstr "היכנס באמצעות טביעת האצבע, הפנים או ה-PIN
msgid "Sign out"
msgstr "התנתקות"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/hi-IN.po b/apps/web/locales/hi-IN.po
index 148c7ec79..0e5af44cb 100644
--- a/apps/web/locales/hi-IN.po
+++ b/apps/web/locales/hi-IN.po
@@ -7507,6 +7507,10 @@ msgstr "अपने फ़िंगरप्रिंट, चेहरे य
msgid "Sign out"
msgstr "साइन आउट"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/hu-HU.po b/apps/web/locales/hu-HU.po
index 8da2fd677..ef1ef8376 100644
--- a/apps/web/locales/hu-HU.po
+++ b/apps/web/locales/hu-HU.po
@@ -7507,6 +7507,10 @@ msgstr "Jelentkezzen be ujjlenyomatával, arcával vagy az eszköz PIN-kódjáva
msgid "Sign out"
msgstr "Kijelentkezés"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/id-ID.po b/apps/web/locales/id-ID.po
index 00a5477ff..de2878ae1 100644
--- a/apps/web/locales/id-ID.po
+++ b/apps/web/locales/id-ID.po
@@ -7507,6 +7507,10 @@ msgstr "Masuk dengan sidik jari, wajah, atau PIN perangkat Anda"
msgid "Sign out"
msgstr "Keluar"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/it-IT.po b/apps/web/locales/it-IT.po
index ad0b6ebe3..0cd0c76be 100644
--- a/apps/web/locales/it-IT.po
+++ b/apps/web/locales/it-IT.po
@@ -7507,6 +7507,10 @@ msgstr "Accedi con l'impronta digitale, il viso o il PIN del dispositivo"
msgid "Sign out"
msgstr "Esci"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ja-JP.po b/apps/web/locales/ja-JP.po
index 20b3039e3..e9be74664 100644
--- a/apps/web/locales/ja-JP.po
+++ b/apps/web/locales/ja-JP.po
@@ -7507,6 +7507,10 @@ msgstr "指紋、顔、またはデバイスの PIN を使用してサインイ
msgid "Sign out"
msgstr "サインアウト"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/km-KH.po b/apps/web/locales/km-KH.po
index 6b0102809..2ea6f967f 100644
--- a/apps/web/locales/km-KH.po
+++ b/apps/web/locales/km-KH.po
@@ -7507,6 +7507,10 @@ msgstr "ចូលដោយប្រើស្នាមម្រាមដៃ ម
msgid "Sign out"
msgstr "ចាកចេញ"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/kn-IN.po b/apps/web/locales/kn-IN.po
index 0acc5168a..ecae07574 100644
--- a/apps/web/locales/kn-IN.po
+++ b/apps/web/locales/kn-IN.po
@@ -7507,6 +7507,10 @@ msgstr "ನಿಮ್ಮ ಫಿಂಗರ್‌ಪ್ರಿಂಟ್, ಮುಖ
msgid "Sign out"
msgstr "ಸೈನ್ ಔಟ್"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ko-KR.po b/apps/web/locales/ko-KR.po
index f205af6bc..6e8196ae6 100644
--- a/apps/web/locales/ko-KR.po
+++ b/apps/web/locales/ko-KR.po
@@ -7507,6 +7507,10 @@ msgstr "지문, 얼굴 또는 장치 PIN으로 로그인"
msgid "Sign out"
msgstr "로그아웃"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/lt-LT.po b/apps/web/locales/lt-LT.po
index 702814d20..cf0f321c3 100644
--- a/apps/web/locales/lt-LT.po
+++ b/apps/web/locales/lt-LT.po
@@ -7507,6 +7507,10 @@ msgstr "Prisijunkite naudodami piršto atspaudą, veidą arba įrenginio PIN kod
msgid "Sign out"
msgstr "Atsijungti"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/lv-LV.po b/apps/web/locales/lv-LV.po
index 16624b7d8..d446409ae 100644
--- a/apps/web/locales/lv-LV.po
+++ b/apps/web/locales/lv-LV.po
@@ -7507,6 +7507,10 @@ msgstr "Pierakstieties ar pirksta nospiedumu, seju vai ierīces PIN"
msgid "Sign out"
msgstr "Atteikties"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ml-IN.po b/apps/web/locales/ml-IN.po
index 7c7f7e1b9..3716cb2f1 100644
--- a/apps/web/locales/ml-IN.po
+++ b/apps/web/locales/ml-IN.po
@@ -7507,6 +7507,10 @@ msgstr "നിങ്ങളുടെ വിരലടയാളം, മുഖം
msgid "Sign out"
msgstr "സൈൻ ഔട്ട്"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/mr-IN.po b/apps/web/locales/mr-IN.po
index 0bf5eec14..cea85a8b6 100644
--- a/apps/web/locales/mr-IN.po
+++ b/apps/web/locales/mr-IN.po
@@ -7507,6 +7507,10 @@ msgstr "तुमच्या फिंगरप्रिंट, चेहरा
msgid "Sign out"
msgstr "साइन आउट"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ms-MY.po b/apps/web/locales/ms-MY.po
index 5bd6eb684..aab3fb27e 100644
--- a/apps/web/locales/ms-MY.po
+++ b/apps/web/locales/ms-MY.po
@@ -7507,6 +7507,10 @@ msgstr "Log masuk dengan cap jari, muka atau PIN peranti anda"
msgid "Sign out"
msgstr "Log keluar"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ne-NP.po b/apps/web/locales/ne-NP.po
index d5e158e09..33ce02a6c 100644
--- a/apps/web/locales/ne-NP.po
+++ b/apps/web/locales/ne-NP.po
@@ -7507,6 +7507,10 @@ msgstr "आफ्नो फिंगरप्रिन्ट, अनुहार
msgid "Sign out"
msgstr "साइन आउट"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/nl-NL.po b/apps/web/locales/nl-NL.po
index a4f0f0591..01350bb25 100644
--- a/apps/web/locales/nl-NL.po
+++ b/apps/web/locales/nl-NL.po
@@ -7507,6 +7507,10 @@ msgstr "Meld u aan met uw vingerafdruk, gezichts- of apparaatpincode"
msgid "Sign out"
msgstr "Uitloggen"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/no-NO.po b/apps/web/locales/no-NO.po
index 3ba16c564..908b28780 100644
--- a/apps/web/locales/no-NO.po
+++ b/apps/web/locales/no-NO.po
@@ -7507,6 +7507,10 @@ msgstr "Logg på med fingeravtrykket, ansiktet eller enhetens PIN-kode"
msgid "Sign out"
msgstr "Logg ut"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/or-IN.po b/apps/web/locales/or-IN.po
index 9b97fc019..ef5a6df0c 100644
--- a/apps/web/locales/or-IN.po
+++ b/apps/web/locales/or-IN.po
@@ -7507,6 +7507,10 @@ msgstr "ଆପଣଙ୍କର ଫିଙ୍ଗର ପ୍ରିଣ୍ଟ, ମୁ
msgid "Sign out"
msgstr "ସାଇନ୍ ଆଉଟ୍ କରନ୍ତୁ"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/pl-PL.po b/apps/web/locales/pl-PL.po
index 126876c00..8af4e13b0 100644
--- a/apps/web/locales/pl-PL.po
+++ b/apps/web/locales/pl-PL.po
@@ -7507,6 +7507,10 @@ msgstr "Zaloguj się za pomocą odcisku palca, twarzy lub kodu PIN urządzenia"
msgid "Sign out"
msgstr "Wyloguj"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/pt-BR.po b/apps/web/locales/pt-BR.po
index 241f64b8d..cdabdbd0d 100644
--- a/apps/web/locales/pt-BR.po
+++ b/apps/web/locales/pt-BR.po
@@ -7507,6 +7507,10 @@ msgstr "Faça login com sua impressão digital, rosto ou PIN do dispositivo"
msgid "Sign out"
msgstr "Sair"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/pt-PT.po b/apps/web/locales/pt-PT.po
index fe34d5537..73f5c789f 100644
--- a/apps/web/locales/pt-PT.po
+++ b/apps/web/locales/pt-PT.po
@@ -7507,6 +7507,10 @@ msgstr "Faça login com a sua impressão digital, rosto ou PIN do dispositivo"
msgid "Sign out"
msgstr "Terminar sessão"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ro-RO.po b/apps/web/locales/ro-RO.po
index 4873482f8..bf6692ecd 100644
--- a/apps/web/locales/ro-RO.po
+++ b/apps/web/locales/ro-RO.po
@@ -7507,6 +7507,10 @@ msgstr "Conectați-vă cu amprenta digitală, chipul sau PIN-ul dispozitivului"
msgid "Sign out"
msgstr "Deconectare"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ru-RU.po b/apps/web/locales/ru-RU.po
index a73c14bf1..c7e20323b 100644
--- a/apps/web/locales/ru-RU.po
+++ b/apps/web/locales/ru-RU.po
@@ -7507,6 +7507,10 @@ msgstr "Войдите в систему с помощью отпечатка п
msgid "Sign out"
msgstr "Выйти"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/sk-SK.po b/apps/web/locales/sk-SK.po
index f3e690e02..d24fe2b7e 100644
--- a/apps/web/locales/sk-SK.po
+++ b/apps/web/locales/sk-SK.po
@@ -7507,6 +7507,10 @@ msgstr "Prihláste sa pomocou odtlačku prsta, tváre alebo kódu PIN zariadenia
msgid "Sign out"
msgstr "Odhlásiť sa"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/sl-SI.po b/apps/web/locales/sl-SI.po
index fb9ccf0bf..9088669de 100644
--- a/apps/web/locales/sl-SI.po
+++ b/apps/web/locales/sl-SI.po
@@ -7507,6 +7507,10 @@ msgstr "Prijavite se s prstnim odtisom, obrazom ali kodo PIN naprave"
msgid "Sign out"
msgstr "Odjava"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/sq-AL.po b/apps/web/locales/sq-AL.po
index 22376f740..ca6c30b7b 100644
--- a/apps/web/locales/sq-AL.po
+++ b/apps/web/locales/sq-AL.po
@@ -7507,6 +7507,10 @@ msgstr "Identifikohu me gjurmën e gishtit, fytyrën ose kodin PIN të pajisjes"
msgid "Sign out"
msgstr "Dilni"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/sr-SP.po b/apps/web/locales/sr-SP.po
index 2a68500c2..013f60be5 100644
--- a/apps/web/locales/sr-SP.po
+++ b/apps/web/locales/sr-SP.po
@@ -7507,6 +7507,10 @@ msgstr "Пријавите се помоћу отиска прста, лица
msgid "Sign out"
msgstr "Одјава"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/sv-SE.po b/apps/web/locales/sv-SE.po
index e9fb6daa4..b03e8280d 100644
--- a/apps/web/locales/sv-SE.po
+++ b/apps/web/locales/sv-SE.po
@@ -7507,6 +7507,10 @@ msgstr "Logga in med ditt fingeravtryck, ansikte eller PIN-kod"
msgid "Sign out"
msgstr "Logga ut"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/ta-IN.po b/apps/web/locales/ta-IN.po
index b51ec7f19..818de3a7c 100644
--- a/apps/web/locales/ta-IN.po
+++ b/apps/web/locales/ta-IN.po
@@ -7507,6 +7507,10 @@ msgstr "உங்கள் கைரேகை, முகம் அல்லத
msgid "Sign out"
msgstr "வெளியேறு"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/te-IN.po b/apps/web/locales/te-IN.po
index f7b72f987..753d3aad5 100644
--- a/apps/web/locales/te-IN.po
+++ b/apps/web/locales/te-IN.po
@@ -7507,6 +7507,10 @@ msgstr "మీ వేలిముద్ర, ముఖం లేదా పరి
msgid "Sign out"
msgstr "సైన్ అవుట్"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/th-TH.po b/apps/web/locales/th-TH.po
index 04edf8595..6fe01df98 100644
--- a/apps/web/locales/th-TH.po
+++ b/apps/web/locales/th-TH.po
@@ -7507,6 +7507,10 @@ msgstr "ลงชื่อเข้าใช้ด้วยลายนิ้ว
msgid "Sign out"
msgstr "ออกจากระบบ"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/tr-TR.po b/apps/web/locales/tr-TR.po
index 298f92790..175befaea 100644
--- a/apps/web/locales/tr-TR.po
+++ b/apps/web/locales/tr-TR.po
@@ -7507,6 +7507,10 @@ msgstr "Parmak iziniz, yüzünüz veya cihaz PIN'inizle oturum açın"
msgid "Sign out"
msgstr "Çıkış yap"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/uk-UA.po b/apps/web/locales/uk-UA.po
index 25c81aedd..2b0e20ef5 100644
--- a/apps/web/locales/uk-UA.po
+++ b/apps/web/locales/uk-UA.po
@@ -7507,6 +7507,10 @@ msgstr "Увійдіть за допомогою відбитка пальця,
msgid "Sign out"
msgstr "Вийти"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/uz-UZ.po b/apps/web/locales/uz-UZ.po
index 32ab5525e..e4ac06357 100644
--- a/apps/web/locales/uz-UZ.po
+++ b/apps/web/locales/uz-UZ.po
@@ -7507,6 +7507,10 @@ msgstr "Barmoq izi, yuz yoki qurilma PIN-kodi bilan tizimga kiring"
msgid "Sign out"
msgstr "Chiqish"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/vi-VN.po b/apps/web/locales/vi-VN.po
index 4c316d3ff..e64ab91a6 100644
--- a/apps/web/locales/vi-VN.po
+++ b/apps/web/locales/vi-VN.po
@@ -7507,6 +7507,10 @@ msgstr "Đăng nhập bằng vân tay, khuôn mặt hoặc mã PIN thiết bị
msgid "Sign out"
msgstr "Đăng xuất"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/zh-CN.po b/apps/web/locales/zh-CN.po
index f7375c2c6..304a2e1e6 100644
--- a/apps/web/locales/zh-CN.po
+++ b/apps/web/locales/zh-CN.po
@@ -7507,6 +7507,10 @@ msgstr "使用您的指纹、面部或设备 PIN 码登录"
msgid "Sign out"
msgstr "退出登录"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/zh-TW.po b/apps/web/locales/zh-TW.po
index afb2fb78f..977a3af8a 100644
--- a/apps/web/locales/zh-TW.po
+++ b/apps/web/locales/zh-TW.po
@@ -7507,6 +7507,10 @@ msgstr "使用您的指紋、臉部或裝置 PIN 碼登錄"
msgid "Sign out"
msgstr "登出"
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/locales/zu-ZA.po b/apps/web/locales/zu-ZA.po
index 45f6d1909..923340c0b 100644
--- a/apps/web/locales/zu-ZA.po
+++ b/apps/web/locales/zu-ZA.po
@@ -7502,6 +7502,10 @@ msgstr ""
msgid "Sign out"
msgstr ""
+#: src/dialogs/auth/change-password.tsx
+msgid "Sign out from all other devices"
+msgstr ""
+
#. Primary action button label on registration form
#: src/features/auth/pages/register.tsx
msgid "Sign up"
diff --git a/apps/web/src/dialogs/auth/change-password.test.tsx b/apps/web/src/dialogs/auth/change-password.test.tsx
new file mode 100644
index 000000000..6bce21c20
--- /dev/null
+++ b/apps/web/src/dialogs/auth/change-password.test.tsx
@@ -0,0 +1,73 @@
+// @vitest-environment happy-dom
+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { afterEach, beforeEach, expect, it, vi } from "vitest";
+import { i18n } from "@lingui/core";
+import { I18nProvider } from "@lingui/react";
+import { Dialog } from "@reactive-resume/ui/components/dialog";
+
+const mocks = vi.hoisted(() => ({ changePassword: vi.fn(), close: vi.fn() }));
+vi.mock("@/libs/auth/client", () => ({
+ authClient: { changePassword: mocks.changePassword },
+}));
+vi.mock("@tanstack/react-query", () => ({ useQueryClient: () => ({ invalidateQueries: vi.fn(async () => {}) }) }));
+vi.mock("@/hooks/use-form-blocker", () => ({ useFormBlocker: () => ({ requestClose: mocks.close }) }));
+vi.mock("@reactive-resume/ui/components/toast", () => ({ toast: { add: vi.fn(), close: vi.fn() } }));
+vi.mock("../store", () => ({
+ useDialogStore: (select: (state: unknown) => unknown) => select({ closeDialog: mocks.close }),
+}));
+
+import { ChangePasswordDialog } from "./change-password";
+
+beforeEach(() => {
+ vi.clearAllMocks();
+ i18n.loadAndActivate({ locale: "en-US", messages: {} });
+ mocks.changePassword.mockResolvedValue({ error: null });
+});
+afterEach(cleanup);
+
+it("sends revokeOtherSessions: true when user checks the option", async () => {
+ render(
+ <I18nProvider i18n={i18n}>
+ <Dialog open>
+ <ChangePasswordDialog />
+ </Dialog>
+ </I18nProvider>,
+ );
+
+ fireEvent.change(screen.getByLabelText("Current Password"), { target: { value: "oldPassword123" } });
+ fireEvent.change(screen.getByLabelText("New Password"), { target: { value: "newPassword456" } });
+ fireEvent.click(screen.getByRole("checkbox", { name: "Sign out from all other devices" }));
+ fireEvent.click(screen.getByRole("button", { name: "Update Password" }));
+
+ await waitFor(() => {
+ expect(mocks.changePassword).toHaveBeenCalledWith({
+ currentPassword: "oldPassword123",
+ newPassword: "newPassword456",
+ revokeOtherSessions: true,
+ });
+ });
+ expect(mocks.close).toHaveBeenCalled();
+});
+
+it("preserves a legacy current password and keeps other sessions by default", async () => {
+ render(
+ <I18nProvider i18n={i18n}>
+ <Dialog open>
+ <ChangePasswordDialog />
+ </Dialog>
+ </I18nProvider>,
+ );
+
+ fireEvent.change(screen.getByLabelText("Current Password"), { target: { value: "old123" } });
+ fireEvent.change(screen.getByLabelText("New Password"), { target: { value: "newPassword456" } });
+ fireEvent.click(screen.getByRole("button", { name: "Update Password" }));
+
+ await waitFor(() => {
+ expect(mocks.changePassword).toHaveBeenCalledWith({
+ currentPassword: "old123",
+ newPassword: "newPassword456",
+ revokeOtherSessions: false,
+ });
+ });
+ expect(mocks.close).toHaveBeenCalled();
+});
diff --git a/apps/web/src/dialogs/auth/change-password.tsx b/apps/web/src/dialogs/auth/change-password.tsx
index ca863894b..d865c41c1 100644
--- a/apps/web/src/dialogs/auth/change-password.tsx
+++ b/apps/web/src/dialogs/auth/change-password.tsx
@@ -1,9 +1,11 @@
import type { DialogProps } from "../store";
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
+import { useSelector } from "@tanstack/react-form";
import { useQueryClient } from "@tanstack/react-query";
import z from "zod";
import { Button } from "@reactive-resume/ui/components/button";
+import { Checkbox } from "@reactive-resume/ui/components/checkbox";
import {
DialogContent,
DialogDescription,
@@ -25,6 +27,7 @@ const formSchema = z
.object({
currentPassword: z.string().min(6).max(64),
newPassword: z.string().min(8).max(64),
+ revokeOtherSessions: z.boolean(),
})
.refine((data) => data.newPassword !== data.currentPassword, {
message: "New password cannot be the same as the current password.",
@@ -39,6 +42,7 @@ export function ChangePasswordDialog(_: DialogProps<"auth.change-password">) {
defaultValues: {
currentPassword: "",
newPassword: "",
+ revokeOtherSessions: false,
},
validators: {
onSubmit: formSchema,
@@ -49,6 +53,7 @@ export function ChangePasswordDialog(_: DialogProps<"auth.change-password">) {
const { error } = await authClient.changePassword({
currentPassword: value.currentPassword,
newPassword: value.newPassword,
+ revokeOtherSessions: value.revokeOtherSessions,
});
if (error) {
@@ -72,6 +77,8 @@ export function ChangePasswordDialog(_: DialogProps<"auth.change-password">) {
},
});
+ const isSubmitting = useSelector(form.store, (state) => state.isSubmitting);
+
useFormBlocker(form);
return (
@@ -103,8 +110,8 @@ export function ChangePasswordDialog(_: DialogProps<"auth.change-password">) {
<FormControl
render={
<PasswordInput
- min={6}
- max={64}
+ minLength={6}
+ maxLength={64}
autoComplete="current-password"
name={field.name}
value={field.state.value}
@@ -127,8 +134,8 @@ export function ChangePasswordDialog(_: DialogProps<"auth.change-password">) {
<FormControl
render={
<PasswordInput
- min={8}
- max={64}
+ minLength={8}
+ maxLength={64}
autoComplete="new-password"
name={field.name}
value={field.state.value}
@@ -142,8 +149,21 @@ export function ChangePasswordDialog(_: DialogProps<"auth.change-password">) {
)}
</form.Field>
+ <form.Field name="revokeOtherSessions">
+ {(field) => (
+ <FormItem className="flex items-center gap-2.5">
+ <FormControl
+ render={<Checkbox name={field.name} checked={field.state.value} onCheckedChange={field.handleChange} />}
+ />
+ <FormLabel>
+ <Trans>Sign out from all other devices</Trans>
+ </FormLabel>
+ </FormItem>
+ )}
+ </form.Field>
+
<DialogFooter>
- <Button type="submit">
+ <Button type="submit" disabled={isSubmitting}>
<Trans comment="Primary action button to submit changed password">Update Password</Trans>
</Button>
</DialogFooter>
diff --git a/apps/web/src/dialogs/auth/disable-two-factor.tsx b/apps/web/src/dialogs/auth/disable-two-factor.tsx
index f3a869239..5e55c4940 100644
--- a/apps/web/src/dialogs/auth/disable-two-factor.tsx
+++ b/apps/web/src/dialogs/auth/disable-two-factor.tsx
@@ -1,6 +1,7 @@
import type { DialogProps } from "../store";
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
+import { useSelector } from "@tanstack/react-form";
import { useQueryClient } from "@tanstack/react-query";
import { useRouter } from "@tanstack/react-router";
import z from "zod";
@@ -69,6 +70,8 @@ export function DisableTwoFactorDialog(_: DialogProps<"auth.two-factor.disable">
},
});
+ const isSubmitting = useSelector(form.store, (state) => state.isSubmitting);
+
useFormBlocker(form);
return (
@@ -103,8 +106,8 @@ export function DisableTwoFactorDialog(_: DialogProps<"auth.two-factor.disable">
<FormControl
render={
<PasswordInput
- min={6}
- max={64}
+ minLength={6}
+ maxLength={64}
autoComplete="current-password"
name={field.name}
value={field.state.value}
@@ -119,7 +122,7 @@ export function DisableTwoFactorDialog(_: DialogProps<"auth.two-factor.disable">
</form.Field>
<DialogFooter>
- <Button type="submit" variant="danger">
+ <Button type="submit" variant="danger" disabled={isSubmitting}>
<Trans comment="Destructive action button to turn off two-factor authentication">Disable 2FA</Trans>
</Button>
</DialogFooter>
diff --git a/apps/web/src/dialogs/auth/enable-two-factor.tsx b/apps/web/src/dialogs/auth/enable-two-factor.tsx
index f668a4936..26060a608 100644
--- a/apps/web/src/dialogs/auth/enable-two-factor.tsx
+++ b/apps/web/src/dialogs/auth/enable-two-factor.tsx
@@ -1,7 +1,7 @@
import type { DialogProps } from "../store";
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
-import { useStore } from "@tanstack/react-form";
+import { useSelector } from "@tanstack/react-form";
import { useQueryClient } from "@tanstack/react-query";
import { useRouter } from "@tanstack/react-router";
import { QRCodeSVG } from "qrcode.react";
@@ -126,10 +126,10 @@ export function EnableTwoFactorDialog(_: DialogProps<"auth.two-factor.enable">)
},
});
- const enableIsDirty = useStore(enableForm.store, (s) => s.isDirty);
- const enableIsSubmitting = useStore(enableForm.store, (s) => s.isSubmitting);
- const verifyIsDirty = useStore(verifyForm.store, (s) => s.isDirty);
- const verifyIsSubmitting = useStore(verifyForm.store, (s) => s.isSubmitting);
+ const enableIsDirty = useSelector(enableForm.store, (s) => s.isDirty);
+ const enableIsSubmitting = useSelector(enableForm.store, (s) => s.isSubmitting);
+ const verifyIsDirty = useSelector(verifyForm.store, (s) => s.isDirty);
+ const verifyIsSubmitting = useSelector(verifyForm.store, (s) => s.isSubmitting);
const { requestClose } = useFormBlocker(enableForm, {
shouldBlock: () => {
@@ -200,8 +200,8 @@ export function EnableTwoFactorDialog(_: DialogProps<"auth.two-factor.enable">)
<FormControl
render={
<PasswordInput
- min={6}
- max={64}
+ minLength={6}
+ maxLength={64}
autoComplete="current-password"
name={field.name}
value={field.state.value}
@@ -216,7 +216,7 @@ export function EnableTwoFactorDialog(_: DialogProps<"auth.two-factor.enable">)
</enableForm.Field>
<DialogFooter>
- <Button type="submit">
+ <Button type="submit" disabled={enableIsSubmitting}>
<Trans>Continue</Trans>
</Button>
</DialogFooter>
@@ -284,7 +284,7 @@ export function EnableTwoFactorDialog(_: DialogProps<"auth.two-factor.enable">)
<Button type="button" variant="secondary" onClick={requestClose}>
<Trans comment="Secondary action button to close two-factor setup dialog">Cancel</Trans>
</Button>
- <Button type="submit">
+ <Button type="submit" disabled={verifyIsSubmitting}>
<Trans comment="Primary action button to proceed to next step in two-factor setup">Continue</Trans>
</Button>
</DialogFooter>
diff --git a/apps/web/src/features/auth/login-redirect.test.tsx b/apps/web/src/features/auth/login-redirect.test.tsx
index 71e0af8f9..ccf6fbc7c 100644
--- a/apps/web/src/features/auth/login-redirect.test.tsx
+++ b/apps/web/src/features/auth/login-redirect.test.tsx
@@ -78,17 +78,37 @@ function renderLogin() {
);
}
-function submitLogin(container: HTMLElement, identifier: string) {
+function submitLogin(container: HTMLElement, identifier: string, passwordValue = "password123") {
const input = container.querySelector('input[name="identifier"]');
const password = container.querySelector('input[name="password"]');
const form = container.querySelector("form");
if (!input || !password || !form) throw new Error("Login form is missing");
fireEvent.change(input, { target: { value: identifier } });
- fireEvent.change(password, { target: { value: "password123" } });
+ fireEvent.change(password, { target: { value: passwordValue } });
fireEvent.submit(form);
}
describe("OAuth callback after sign-in", () => {
+ it("accepts a legacy password and prevents duplicate sign-in until a failed request finishes", async () => {
+ let finish: (() => void) | undefined;
+ mocks.email.mockReturnValue(
+ new Promise((resolve) => {
+ finish = () => resolve({ error: { message: "Invalid credentials" } });
+ }),
+ );
+ const { container } = renderLogin();
+ const submit = screen.getByRole<HTMLButtonElement>("button", { name: "Sign in" });
+ submitLogin(container, "[email protected]", "old123");
+ await waitFor(() => expect(mocks.email).toHaveBeenCalledOnce());
+ expect(mocks.email).toHaveBeenCalledWith(expect.objectContaining({ password: "old123" }));
+ expect(submit.disabled).toBe(true);
+ fireEvent.click(submit);
+ expect(mocks.email).toHaveBeenCalledOnce();
+ finish?.();
+ await waitFor(() => expect(submit.disabled).toBe(false));
+ expect(mocks.navigate).not.toHaveBeenCalled();
+ });
+
it.each(["[email protected]", "john"])(
"resumes the signed server callback after email/username sign-in (%s)",
async (identifier) => {
diff --git a/apps/web/src/features/auth/pages/forgot-password.tsx b/apps/web/src/features/auth/pages/forgot-password.tsx
index 167aba458..5416e5603 100644
--- a/apps/web/src/features/auth/pages/forgot-password.tsx
+++ b/apps/web/src/features/auth/pages/forgot-password.tsx
@@ -1,5 +1,6 @@
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
+import { useSelector } from "@tanstack/react-form";
import { Link } from "@tanstack/react-router";
import { useState } from "react";
import z from "zod";
@@ -50,6 +51,8 @@ export function ForgotPasswordPage() {
},
});
+ const isSubmitting = useSelector(form.store, (state) => state.isSubmitting);
+
if (submitted) return <PostForgotPasswordScreen />;
return (
@@ -109,7 +112,7 @@ export function ForgotPasswordPage() {
)}
</form.Field>
- <Button type="submit" className="w-full">
+ <Button type="submit" className="w-full" disabled={isSubmitting}>
<Trans comment="Primary action button label on forgot-password form">Send Password Reset Email</Trans>
</Button>
</form>
diff --git a/apps/web/src/features/auth/pages/login.tsx b/apps/web/src/features/auth/pages/login.tsx
index d7b476953..8461366b6 100644
--- a/apps/web/src/features/auth/pages/login.tsx
+++ b/apps/web/src/features/auth/pages/login.tsx
@@ -1,6 +1,7 @@
import type { QueryClient } from "@tanstack/react-query";
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
+import { useSelector } from "@tanstack/react-form";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { Link, useNavigate, useRouter, useSearch } from "@tanstack/react-router";
import { useEffect, useRef } from "react";
@@ -20,7 +21,7 @@ import { useAppForm } from "@/libs/tanstack-form";
const formSchema = z.object({
identifier: z.string().trim().toLowerCase(),
- password: z.string().trim().min(6).max(64),
+ password: z.string().min(6).max(64),
});
type Props = {
@@ -109,6 +110,8 @@ export function LoginPage({ disableEmailAuth, disableSignups }: Props) {
},
});
+ const isSubmitting = useSelector(form.store, (state) => state.isSubmitting);
+
useEffect(() => {
if (!("passkey" in providers)) return;
if (!("PublicKeyCredential" in window)) return;
@@ -220,8 +223,8 @@ export function LoginPage({ disableEmailAuth, disableSignups }: Props) {
<FormControl
render={
<PasswordInput
- min={6}
- max={64}
+ minLength={6}
+ maxLength={64}
autoComplete="section-login current-password"
name={field.name}
value={field.state.value}
@@ -235,7 +238,7 @@ export function LoginPage({ disableEmailAuth, disableSignups }: Props) {
)}
</form.Field>
- <Button type="submit" className="w-full">
+ <Button type="submit" className="w-full" disabled={isSubmitting}>
<Trans comment="Primary action button label on login form">Sign in</Trans>
</Button>
</form>
diff --git a/apps/web/src/features/auth/pages/register.tsx b/apps/web/src/features/auth/pages/register.tsx
index 6b8ecf395..ca75190c9 100644
--- a/apps/web/src/features/auth/pages/register.tsx
+++ b/apps/web/src/features/auth/pages/register.tsx
@@ -1,5 +1,6 @@
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
+import { useSelector } from "@tanstack/react-form";
import { useQueryClient } from "@tanstack/react-query";
import { Link, useSearch } from "@tanstack/react-router";
import { useState } from "react";
@@ -90,6 +91,8 @@ export function RegisterPage({ disableEmailAuth }: Props) {
},
});
+ const isSubmitting = useSelector(form.store, (state) => state.isSubmitting);
+
if (submitted) return <PostSignupScreen />;
return (
@@ -217,8 +220,8 @@ export function RegisterPage({ disableEmailAuth }: Props) {
<FormControl
render={
<PasswordInput
- min={8}
- max={64}
+ minLength={8}
+ maxLength={64}
autoComplete="section-register new-password"
name={field.name}
value={field.state.value}
@@ -232,7 +235,7 @@ export function RegisterPage({ disableEmailAuth }: Props) {
)}
</form.Field>
- <Button type="submit" className="w-full">
+ <Button type="submit" className="w-full" disabled={isSubmitting}>
<Trans comment="Primary action button label on registration form">Sign up</Trans>
</Button>
</form>
diff --git a/apps/web/src/features/auth/pages/reset-password.tsx b/apps/web/src/features/auth/pages/reset-password.tsx
index b9347cb5a..b7d96f38b 100644
--- a/apps/web/src/features/auth/pages/reset-password.tsx
+++ b/apps/web/src/features/auth/pages/reset-password.tsx
@@ -1,5 +1,6 @@
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
+import { useSelector } from "@tanstack/react-form";
import { useNavigate } from "@tanstack/react-router";
import z from "zod";
import { Button } from "@reactive-resume/ui/components/button";
@@ -52,6 +53,8 @@ export function ResetPasswordPage({ token }: Props) {
},
});
+ const isSubmitting = useSelector(form.store, (state) => state.isSubmitting);
+
return (
<>
<div className="space-y-1 text-center">
@@ -81,8 +84,8 @@ export function ResetPasswordPage({ token }: Props) {
<FormControl
render={
<PasswordInput
- min={8}
- max={64}
+ minLength={8}
+ maxLength={64}
autoComplete="new-password"
name={field.name}
value={field.state.value}
@@ -96,7 +99,7 @@ export function ResetPasswordPage({ token }: Props) {
)}
</form.Field>
- <Button type="submit" className="w-full">
+ <Button type="submit" className="w-full" disabled={isSubmitting}>
<Trans comment="Primary action button label on reset-password form">Reset Password</Trans>
</Button>
</form>
diff --git a/apps/web/src/features/auth/pages/resume-password.tsx b/apps/web/src/features/auth/pages/resume-password.tsx
index 6614309f4..84a81abf4 100644
--- a/apps/web/src/features/auth/pages/resume-password.tsx
+++ b/apps/web/src/features/auth/pages/resume-password.tsx
@@ -26,7 +26,7 @@ type ResumePasswordPageProps = {
export function ResumePasswordPage({ username, slug, redirectPath }: ResumePasswordPageProps) {
const navigate = useNavigate();
- const { mutate: verifyPassword } = useMutation(orpc.resume.verifyPassword.mutationOptions());
+ const { mutate: verifyPassword, isPending } = useMutation(orpc.resume.verifyPassword.mutationOptions());
const form = useAppForm({
defaultValues: { password: "" },
@@ -101,8 +101,8 @@ export function ResumePasswordPage({ username, slug, redirectPath }: ResumePassw
<FormControl
render={
<PasswordInput
- min={6}
- max={64}
+ minLength={6}
+ maxLength={64}
autoComplete="new-password"
name={field.name}
value={field.state.value}
@@ -116,7 +116,7 @@ export function ResumePasswordPage({ username, slug, redirectPath }: ResumePassw
)}
</form.Field>
- <Button type="submit" className="w-full">
+ <Button type="submit" className="w-full" disabled={isPending}>
<Icon name="lock_open" size={16} />
<Trans comment="Primary action button label to unlock a password-protected resume">Unlock</Trans>
</Button>
diff --git a/apps/web/src/features/auth/pages/verify-2fa.tsx b/apps/web/src/features/auth/pages/verify-2fa.tsx
index 739373e12..1f9a36a99 100644
--- a/apps/web/src/features/auth/pages/verify-2fa.tsx
+++ b/apps/web/src/features/auth/pages/verify-2fa.tsx
@@ -1,5 +1,6 @@
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
+import { useSelector } from "@tanstack/react-form";
import { useQueryClient } from "@tanstack/react-query";
import { Link, useNavigate, useRouter, useSearch } from "@tanstack/react-router";
import z from "zod";
@@ -73,6 +74,8 @@ function TwoFactorVerificationPage({ backupCode = false }: TwoFactorVerification
},
});
+ const isSubmitting = useSelector(form.store, (state) => state.isSubmitting);
+
return (
<>
<div className="space-y-1 text-center">
@@ -151,7 +154,7 @@ function TwoFactorVerificationPage({ backupCode = false }: TwoFactorVerification
}
/>
- <Button type="submit" className="flex-1">
+ <Button type="submit" className="flex-1" disabled={isSubmitting}>
<Icon name="check" size={16} />
{backupCode ? (
<Trans comment="Primary action button to submit backup code">Verify</Trans>
diff --git a/apps/web/src/hooks/use-form-blocker.tsx b/apps/web/src/hooks/use-form-blocker.tsx
index c5d709e6d..eab5ba931 100644
--- a/apps/web/src/hooks/use-form-blocker.tsx
+++ b/apps/web/src/hooks/use-form-blocker.tsx
@@ -1,6 +1,6 @@
import type { AnyFormApi } from "@tanstack/react-form";
import { t } from "@lingui/core/macro";
-import { useStore } from "@tanstack/react-form";
+import { useSelector } from "@tanstack/react-form";
import { useEffect, useRef } from "react";
import { useDialogStore } from "@/dialogs/store";
import { useConfirm } from "@/hooks/use-confirm";
@@ -14,8 +14,8 @@ export function useFormBlocker(form: Pick<AnyFormApi, "store">, options?: UseFor
const onOpenChange = useDialogStore((state) => state.onOpenChange);
const setOnBeforeClose = useDialogStore((state) => state.setOnBeforeClose);
- const isDirty = useStore(form.store, (state) => state.isDirty);
- const isSubmitting = useStore(form.store, (state) => state.isSubmitting);
+ const isDirty = useSelector(form.store, (state) => state.isDirty);
+ const isSubmitting = useSelector(form.store, (state) => state.isSubmitting);
const shouldBlockRef = useRef(options?.shouldBlock);
useEffect(() => {
diff --git a/apps/web/src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx b/apps/web/src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
index 03d02edb8..9f48981b6 100644
--- a/apps/web/src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
+++ b/apps/web/src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
@@ -2,7 +2,7 @@ import type { ReactNode } from "react";
import type z from "zod";
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
-import { useStore } from "@tanstack/react-form";
+import { useSelector } from "@tanstack/react-form";
import { AnimatePresence, m } from "motion/react";
import { colorDesignSchema, levelDesignSchema } from "@reactive-resume/schema/resume/data";
import { resolveLevelDisplaySizes } from "@reactive-resume/schema/resume/level-display-sizes";
@@ -232,8 +232,8 @@ function LevelSectionForm() {
});
useSyncFormValues(form, levelDesign);
- const previewType = useStore(form.store, (s) => s.values.type);
- const previewIcon = useStore(form.store, (s) => s.values.icon);
+ const previewType = useSelector(form.store, (s) => s.values.type);
+ const previewIcon = useSelector(form.store, (s) => s.values.icon);
const { decorationSize, levelIconExplicitSize } = resolveLevelDisplaySizes({
bodyFontSize: resume.data.metadata.typography.body.fontSize,
});
diff --git a/apps/web/src/routes/builder/$resumeId/-sidebar/right/sections/typography.tsx b/apps/web/src/routes/builder/$resumeId/-sidebar/right/sections/typography.tsx
index 625bbfac5..4e1873958 100644
--- a/apps/web/src/routes/builder/$resumeId/-sidebar/right/sections/typography.tsx
+++ b/apps/web/src/routes/builder/$resumeId/-sidebar/right/sections/typography.tsx
@@ -1,7 +1,7 @@
import type { ReactNode } from "react";
import type z from "zod";
import { Trans } from "@lingui/react/macro";
-import { useStore } from "@tanstack/react-form";
+import { useSelector } from "@tanstack/react-form";
import { typographySchema } from "@reactive-resume/schema/resume/data";
import { FormControl, FormDescription, FormItem, FormLabel, FormMessage } from "@reactive-resume/ui/components/form";
import {
@@ -115,7 +115,7 @@ type TypographyGroupFieldsProps = {
};
function TypographyGroupFields({ form, prefix, handleAutoSave }: TypographyGroupFieldsProps) {
- const fontFamily = useStore(form.store, (s) => s.values[prefix].fontFamily);
+ const fontFamily = useSelector(form.store, (s) => s.values[prefix].fontFamily);
return (
<>
diff --git a/docs/guides/updating-your-profile.mdx b/docs/guides/updating-your-profile.mdx
index a4a3aee0d..e7bd14362 100644
--- a/docs/guides/updating-your-profile.mdx
+++ b/docs/guides/updating-your-profile.mdx
@@ -57,7 +57,7 @@ Select **Change photo** and choose an image. It uploads right away and replaces
<Step title="Enter your current and new password">
Fill in **Current Password** and **New Password**. The new password must be different from the current one and at
- least 8 characters long.
+ least 8 characters long. Select **Sign out from all other devices** to revoke your other sessions when changing it.
</Step>
<Step title="Select Update Password">
diff --git a/packages/utils/src/rate-limit.ts b/packages/utils/src/rate-limit.ts
index cecf766c9..219231f3a 100644
--- a/packages/utils/src/rate-limit.ts
+++ b/packages/utils/src/rate-limit.ts
@@ -14,6 +14,7 @@ export const rateLimitConfig = {
max: 60,
customRules: {
"/sign-in/email": { window: 60, max: 5 },
+ "/sign-in/username": { window: 60, max: 5 },
"/sign-up/email": { window: 60, max: 3 },
"/request-password-reset": { window: 600, max: 3 },
"/send-verification-email": { window: 600, max: 3 },