Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: updated the account recovery page

=398fb1f9795a
diff --git a/frontend/src/hooks/api/account-recovery/index.tsx b/frontend/src/hooks/api/accountRecovery/index.tsx
similarity index 100%
rename from frontend/src/hooks/api/account-recovery/index.tsx
rename to frontend/src/hooks/api/accountRecovery/index.tsx
diff --git a/frontend/src/hooks/api/account-recovery/mutation.tsx b/frontend/src/hooks/api/accountRecovery/mutation.tsx
similarity index 100%
rename from frontend/src/hooks/api/account-recovery/mutation.tsx
rename to frontend/src/hooks/api/accountRecovery/mutation.tsx
diff --git a/frontend/src/hooks/api/account-recovery/types.ts b/frontend/src/hooks/api/accountRecovery/types.ts
similarity index 100%
rename from frontend/src/hooks/api/account-recovery/types.ts
rename to frontend/src/hooks/api/accountRecovery/types.ts
diff --git a/frontend/src/hooks/api/index.tsx b/frontend/src/hooks/api/index.tsx
index 03dd7d94b3..204d775924 100644
--- a/frontend/src/hooks/api/index.tsx
+++ b/frontend/src/hooks/api/index.tsx
@@ -1,4 +1,5 @@
export * from "./accessApproval";
+export * from "./accountRecovery";
export * from "./admin";
export * from "./aiMcpActivityLogs";
export * from "./aiMcpEndpoints";
diff --git a/frontend/src/pages/auth/VerifyEmailPage/AccountRecoveryPage.tsx b/frontend/src/pages/auth/AccountRecoveryPage/AccountRecoveryPage.tsx
similarity index 93%
rename from frontend/src/pages/auth/VerifyEmailPage/AccountRecoveryPage.tsx
rename to frontend/src/pages/auth/AccountRecoveryPage/AccountRecoveryPage.tsx
index 4776bbbb5b..e01a42fde7 100644
--- a/frontend/src/pages/auth/VerifyEmailPage/AccountRecoveryPage.tsx
+++ b/frontend/src/pages/auth/AccountRecoveryPage/AccountRecoveryPage.tsx
@@ -4,7 +4,7 @@ import { Link } from "@tanstack/react-router";
import { Button, EmailServiceSetupModal, Input } from "@app/components/v2";
import { usePopUp } from "@app/hooks";
-import { useSendAccountRecoveryEmail } from "@app/hooks/api/account-recovery";
+import { useSendAccountRecoveryEmail } from "@app/hooks/api";
import { useFetchServerStatus } from "@app/hooks/api/serverDetails";
export const AccountRecoveryPage = () => {
@@ -72,11 +72,11 @@ export const AccountRecoveryPage = () => {
className="mx-auto flex w-full flex-col items-center justify-center"
>
<h1 className="mb-2 bg-linear-to-b from-white to-bunker-200 bg-clip-text text-center text-xl font-medium text-transparent">
- Forgot your password?
+ Recover your account?
</h1>
<p className="w-max justify-center text-center text-sm text-gray-400">
- Enter your email to start the password reset process. <br /> You will receive an email
- with instructions.
+ Enter your email to start the recovery process. <br /> You will receive an email with
+ instructions.
</p>
<div className="mt-8 w-1/4 min-w-[21.2rem] rounded-md text-center md:min-w-[20.1rem] lg:w-1/6">
<Input
@@ -118,7 +118,7 @@ export const AccountRecoveryPage = () => {
</h1>
<p className="w-max max-w-lg justify-center text-center text-sm text-gray-400">
If the email is in our system, you will receive an email at{" "}
- <span className="italic">{email}</span> with instructions on how to reset your password.
+ <span className="italic">{email}</span> to initiate the account recovery process.
</p>
<div className="mt-6 flex flex-row text-sm text-bunker-400">
<Link to="/login">
diff --git a/frontend/src/pages/auth/AccountRecoveryPage/route.tsx b/frontend/src/pages/auth/AccountRecoveryPage/route.tsx
new file mode 100644
index 0000000000..ef0effd903
--- /dev/null
+++ b/frontend/src/pages/auth/AccountRecoveryPage/route.tsx
@@ -0,0 +1,9 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+import { AccountRecoveryPage } from './AccountRecoveryPage'
+
+export const Route = createFileRoute(
+ '/_restrict-login-signup/account-recovery',
+)({
+ component: AccountRecoveryPage,
+})
diff --git a/frontend/src/pages/auth/LoginPage/components/InitialStep/InitialStep.tsx b/frontend/src/pages/auth/LoginPage/components/InitialStep/InitialStep.tsx
index 065801a834..8041e15273 100644
--- a/frontend/src/pages/auth/LoginPage/components/InitialStep/InitialStep.tsx
+++ b/frontend/src/pages/auth/LoginPage/components/InitialStep/InitialStep.tsx
@@ -438,7 +438,7 @@ export const InitialStep = ({
)}
{shouldDisplayLoginMethod(LoginMethod.EMAIL) && (
<div className="mt-2 flex flex-row text-sm text-bunker-400">
- <Link to="/verify-email">
+ <Link to="/account-recovery">
<span className="cursor-pointer duration-200 hover:text-bunker-200 hover:underline hover:decoration-primary-700 hover:underline-offset-4">
Recover your account
</span>
diff --git a/frontend/src/pages/auth/PasswordResetPage/components/ConfirmEmailStep.tsx b/frontend/src/pages/auth/PasswordResetPage/components/ConfirmEmailStep.tsx
index 4818c5f2f0..ebbbd3c465 100644
--- a/frontend/src/pages/auth/PasswordResetPage/components/ConfirmEmailStep.tsx
+++ b/frontend/src/pages/auth/PasswordResetPage/components/ConfirmEmailStep.tsx
@@ -2,7 +2,7 @@ import { useNavigate, useSearch } from "@tanstack/react-router";
import { Button } from "@app/components/v2";
import { ROUTE_PATHS } from "@app/const/routes";
-import { useVerifyPasswordResetCode } from "@app/hooks/api";
+import { useVerifyAccountRecoveryEmail } from "@app/hooks/api";
import { UserEncryptionVersion } from "@app/hooks/api/auth/types";
type Props = {
@@ -17,7 +17,7 @@ export const ConfirmEmailStep = ({ onComplete }: Props) => {
const {
mutateAsync: verifyPasswordResetCodeMutateAsync,
isPending: isVerifyPasswordResetLoading
- } = useVerifyPasswordResetCode();
+ } = useVerifyAccountRecoveryEmail();
return (
<div className="mx-auto flex w-full flex-col items-center justify-center">
<h1 className="mb-2 bg-linear-to-b from-white to-bunker-200 bg-clip-text text-center text-xl font-medium text-transparent">
diff --git a/frontend/src/pages/auth/VerifyEmailPage/route.tsx b/frontend/src/pages/auth/VerifyEmailPage/route.tsx
deleted file mode 100644
index 7ed66f4c40..0000000000
--- a/frontend/src/pages/auth/VerifyEmailPage/route.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import { createFileRoute } from "@tanstack/react-router";
-
-import { AccountRecoveryPage } from "./AccountRecoveryPage";
-
-export const Route = createFileRoute("/_restrict-login-signup/verify-email")({
- component: AccountRecoveryPage
-});
diff --git a/frontend/src/routeTree.gen.ts b/frontend/src/routeTree.gen.ts
index 78affc1f79..ba6d11bfaa 100644
--- a/frontend/src/routeTree.gen.ts
+++ b/frontend/src/routeTree.gen.ts
@@ -20,11 +20,11 @@ import { Route as publicShareSecretPageRouteImport } from './pages/public/ShareS
import { Route as authCliRedirectPageRouteImport } from './pages/auth/CliRedirectPage/route'
import { Route as indexImport } from './pages/index'
import { Route as middlewaresInjectOrgDetailsImport } from './pages/middlewares/inject-org-details'
-import { Route as authVerifyEmailPageRouteImport } from './pages/auth/VerifyEmailPage/route'
import { Route as authSignUpInvitePageRouteImport } from './pages/auth/SignUpInvitePage/route'
import { Route as authRequestNewInvitePageRouteImport } from './pages/auth/RequestNewInvitePage/route'
import { Route as authPasswordResetPageRouteImport } from './pages/auth/PasswordResetPage/route'
import { Route as authEmailNotVerifiedPageRouteImport } from './pages/auth/EmailNotVerifiedPage/route'
+import { Route as authAccountRecoveryPageRouteImport } from './pages/auth/AccountRecoveryPage/route'
import { Route as authPasswordSetupPageRouteImport } from './pages/auth/PasswordSetupPage/route'
import { Route as userLayoutImport } from './pages/user/layout'
import { Route as organizationLayoutImport } from './pages/organization/layout'
@@ -428,12 +428,6 @@ const middlewaresInjectOrgDetailsRoute =
getParentRoute: () => middlewaresAuthenticateRoute,
} as any)
-const authVerifyEmailPageRouteRoute = authVerifyEmailPageRouteImport.update({
- id: '/verify-email',
- path: '/verify-email',
- getParentRoute: () => middlewaresRestrictLoginSignupRoute,
-} as any)
-
const authSignUpInvitePageRouteRoute = authSignUpInvitePageRouteImport.update({
id: '/signupinvite',
path: '/signupinvite',
@@ -462,6 +456,13 @@ const authEmailNotVerifiedPageRouteRoute =
getParentRoute: () => middlewaresRestrictLoginSignupRoute,
} as any)
+const authAccountRecoveryPageRouteRoute =
+ authAccountRecoveryPageRouteImport.update({
+ id: '/account-recovery',
+ path: '/account-recovery',
+ getParentRoute: () => middlewaresRestrictLoginSignupRoute,
+ } as any)
+
const authPasswordSetupPageRouteRoute = authPasswordSetupPageRouteImport.update(
{
id: '/password-setup',
@@ -2424,6 +2425,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof authPasswordSetupPageRouteImport
parentRoute: typeof middlewaresAuthenticateImport
}
+ '/_restrict-login-signup/account-recovery': {
+ id: '/_restrict-login-signup/account-recovery'
+ path: '/account-recovery'
+ fullPath: '/account-recovery'
+ preLoaderRoute: typeof authAccountRecoveryPageRouteImport
+ parentRoute: typeof middlewaresRestrictLoginSignupImport
+ }
'/_restrict-login-signup/email-not-verified': {
id: '/_restrict-login-signup/email-not-verified'
path: '/email-not-verified'
@@ -2452,13 +2460,6 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof authSignUpInvitePageRouteImport
parentRoute: typeof middlewaresRestrictLoginSignupImport
}
- '/_restrict-login-signup/verify-email': {
- id: '/_restrict-login-signup/verify-email'
- path: '/verify-email'
- fullPath: '/verify-email'
- preLoaderRoute: typeof authVerifyEmailPageRouteImport
- parentRoute: typeof middlewaresRestrictLoginSignupImport
- }
'/_authenticate/_inject-org-details': {
id: '/_authenticate/_inject-org-details'
path: ''
@@ -5383,11 +5384,11 @@ const RestrictLoginSignupSignupRouteWithChildren =
)
interface middlewaresRestrictLoginSignupRouteChildren {
+ authAccountRecoveryPageRouteRoute: typeof authAccountRecoveryPageRouteRoute
authEmailNotVerifiedPageRouteRoute: typeof authEmailNotVerifiedPageRouteRoute
authPasswordResetPageRouteRoute: typeof authPasswordResetPageRouteRoute
authRequestNewInvitePageRouteRoute: typeof authRequestNewInvitePageRouteRoute
authSignUpInvitePageRouteRoute: typeof authSignUpInvitePageRouteRoute
- authVerifyEmailPageRouteRoute: typeof authVerifyEmailPageRouteRoute
RestrictLoginSignupLoginRoute: typeof RestrictLoginSignupLoginRouteWithChildren
RestrictLoginSignupSignupRoute: typeof RestrictLoginSignupSignupRouteWithChildren
adminSignUpPageRouteRoute: typeof adminSignUpPageRouteRoute
@@ -5395,11 +5396,11 @@ interface middlewaresRestrictLoginSignupRouteChildren {
const middlewaresRestrictLoginSignupRouteChildren: middlewaresRestrictLoginSignupRouteChildren =
{
+ authAccountRecoveryPageRouteRoute: authAccountRecoveryPageRouteRoute,
authEmailNotVerifiedPageRouteRoute: authEmailNotVerifiedPageRouteRoute,
authPasswordResetPageRouteRoute: authPasswordResetPageRouteRoute,
authRequestNewInvitePageRouteRoute: authRequestNewInvitePageRouteRoute,
authSignUpInvitePageRouteRoute: authSignUpInvitePageRouteRoute,
- authVerifyEmailPageRouteRoute: authVerifyEmailPageRouteRoute,
RestrictLoginSignupLoginRoute: RestrictLoginSignupLoginRouteWithChildren,
RestrictLoginSignupSignupRoute: RestrictLoginSignupSignupRouteWithChildren,
adminSignUpPageRouteRoute: adminSignUpPageRouteRoute,
@@ -5417,11 +5418,11 @@ export interface FileRoutesByFullPath {
'/upgrade-path': typeof publicUpgradePathPageRouteRoute
'': typeof organizationLayoutRouteWithChildren
'/password-setup': typeof authPasswordSetupPageRouteRoute
+ '/account-recovery': typeof authAccountRecoveryPageRouteRoute
'/email-not-verified': typeof authEmailNotVerifiedPageRouteRoute
'/password-reset': typeof authPasswordResetPageRouteRoute
'/requestnewinvite': typeof authRequestNewInvitePageRouteRoute
'/signupinvite': typeof authSignUpInvitePageRouteRoute
- '/verify-email': typeof authVerifyEmailPageRouteRoute
'/personal-settings': typeof userLayoutRouteWithChildren
'/login': typeof RestrictLoginSignupLoginRouteWithChildren
'/signup': typeof RestrictLoginSignupSignupRouteWithChildren
@@ -5677,11 +5678,11 @@ export interface FileRoutesByTo {
'/upgrade-path': typeof publicUpgradePathPageRouteRoute
'': typeof organizationLayoutRouteWithChildren
'/password-setup': typeof authPasswordSetupPageRouteRoute
+ '/account-recovery': typeof authAccountRecoveryPageRouteRoute
'/email-not-verified': typeof authEmailNotVerifiedPageRouteRoute
'/password-reset': typeof authPasswordResetPageRouteRoute
'/requestnewinvite': typeof authRequestNewInvitePageRouteRoute
'/signupinvite': typeof authSignUpInvitePageRouteRoute
- '/verify-email': typeof authVerifyEmailPageRouteRoute
'/personal-settings': typeof userPersonalSettingsPageRouteRoute
'/login': typeof authLoginPageRouteRoute
'/signup': typeof authSignUpPageRouteRoute
@@ -5924,11 +5925,11 @@ export interface FileRoutesById {
'/_authenticate': typeof middlewaresAuthenticateRouteWithChildren
'/_restrict-login-signup': typeof middlewaresRestrictLoginSignupRouteWithChildren
'/_authenticate/password-setup': typeof authPasswordSetupPageRouteRoute
+ '/_restrict-login-signup/account-recovery': typeof authAccountRecoveryPageRouteRoute
'/_restrict-login-signup/email-not-verified': typeof authEmailNotVerifiedPageRouteRoute
'/_restrict-login-signup/password-reset': typeof authPasswordResetPageRouteRoute
'/_restrict-login-signup/requestnewinvite': typeof authRequestNewInvitePageRouteRoute
'/_restrict-login-signup/signupinvite': typeof authSignUpInvitePageRouteRoute
- '/_restrict-login-signup/verify-email': typeof authVerifyEmailPageRouteRoute
'/_authenticate/_inject-org-details': typeof middlewaresInjectOrgDetailsRouteWithChildren
'/_authenticate/personal-settings': typeof AuthenticatePersonalSettingsRouteWithChildren
'/_restrict-login-signup/login': typeof RestrictLoginSignupLoginRouteWithChildren
@@ -6197,11 +6198,11 @@ export interface FileRouteTypes {
| '/upgrade-path'
| ''
| '/password-setup'
+ | '/account-recovery'
| '/email-not-verified'
| '/password-reset'
| '/requestnewinvite'
| '/signupinvite'
- | '/verify-email'
| '/personal-settings'
| '/login'
| '/signup'
@@ -6456,11 +6457,11 @@ export interface FileRouteTypes {
| '/upgrade-path'
| ''
| '/password-setup'
+ | '/account-recovery'
| '/email-not-verified'
| '/password-reset'
| '/requestnewinvite'
| '/signupinvite'
- | '/verify-email'
| '/personal-settings'
| '/login'
| '/signup'
@@ -6701,11 +6702,11 @@ export interface FileRouteTypes {
| '/_authenticate'
| '/_restrict-login-signup'
| '/_authenticate/password-setup'
+ | '/_restrict-login-signup/account-recovery'
| '/_restrict-login-signup/email-not-verified'
| '/_restrict-login-signup/password-reset'
| '/_restrict-login-signup/requestnewinvite'
| '/_restrict-login-signup/signupinvite'
- | '/_restrict-login-signup/verify-email'
| '/_authenticate/_inject-org-details'
| '/_authenticate/personal-settings'
| '/_restrict-login-signup/login'
@@ -7037,11 +7038,11 @@ export const routeTree = rootRoute
"/_restrict-login-signup": {
"filePath": "middlewares/restrict-login-signup.tsx",
"children": [
+ "/_restrict-login-signup/account-recovery",
"/_restrict-login-signup/email-not-verified",
"/_restrict-login-signup/password-reset",
"/_restrict-login-signup/requestnewinvite",
"/_restrict-login-signup/signupinvite",
- "/_restrict-login-signup/verify-email",
"/_restrict-login-signup/login",
"/_restrict-login-signup/signup",
"/_restrict-login-signup/admin/signup"
@@ -7051,6 +7052,10 @@ export const routeTree = rootRoute
"filePath": "auth/PasswordSetupPage/route.tsx",
"parent": "/_authenticate"
},
+ "/_restrict-login-signup/account-recovery": {
+ "filePath": "auth/AccountRecoveryPage/route.tsx",
+ "parent": "/_restrict-login-signup"
+ },
"/_restrict-login-signup/email-not-verified": {
"filePath": "auth/EmailNotVerifiedPage/route.tsx",
"parent": "/_restrict-login-signup"
@@ -7067,10 +7072,6 @@ export const routeTree = rootRoute
"filePath": "auth/SignUpInvitePage/route.tsx",
"parent": "/_restrict-login-signup"
},
- "/_restrict-login-signup/verify-email": {
- "filePath": "auth/VerifyEmailPage/route.tsx",
- "parent": "/_restrict-login-signup"
- },
"/_authenticate/_inject-org-details": {
"filePath": "middlewares/inject-org-details.tsx",
"parent": "/_authenticate",
diff --git a/frontend/src/routes.ts b/frontend/src/routes.ts
index bbf09881db..a1c16d2222 100644
--- a/frontend/src/routes.ts
+++ b/frontend/src/routes.ts
@@ -444,7 +444,7 @@ export const routes = rootRoute("root.tsx", [
route("/password-reset", "auth/PasswordResetPage/route.tsx"),
route("/requestnewinvite", "auth/RequestNewInvitePage/route.tsx"),
route("/signupinvite", "auth/SignUpInvitePage/route.tsx"),
- route("/verify-email", "auth/VerifyEmailPage/route.tsx")
+ route("/account-recovery", "auth/AccountRecoveryPage/route.tsx")
]),
middleware("authenticate.tsx", [
route("/password-setup", "auth/PasswordSetupPage/route.tsx"),