diff --git a/packages/constants/src/auth.ts b/packages/constants/src/auth.ts index c12b63d63..065b188cf 100644 --- a/packages/constants/src/auth.ts +++ b/packages/constants/src/auth.ts @@ -1,5 +1,6 @@ import { ReactNode } from "react"; -import Link from "next/link"; +// import Link from "next/link"; +// import { EAuthenticationErrorCodes } from "@/helpers/authentication.helper"; export enum EPageTypes { PUBLIC = "PUBLIC", @@ -41,7 +42,7 @@ export enum EAuthErrorCodes { // Password strength INVALID_PASSWORD = "5020", // Sign Up - USER_ACCOUNT_DEACTIVATED = "5019", + // USER_ACCOUNT_DEACTIVATED = "5019", USER_ALREADY_EXIST = "5030", AUTHENTICATION_FAILED_SIGN_UP = "5035", REQUIRED_EMAIL_PASSWORD_SIGN_UP = "5040", @@ -91,281 +92,281 @@ export type TAuthErrorInfo = { message: ReactNode; }; -const errorCodeMessages: { - [key in EAuthErrorCodes]: { title: string; message: (email?: string | undefined) => ReactNode }; -} = { - // global - [EAuthErrorCodes.INSTANCE_NOT_CONFIGURED]: { - title: `Instance not configured`, - message: () => `Instance not configured. Please contact your administrator.`, - }, - [EAuthErrorCodes.SIGNUP_DISABLED]: { - title: `Sign up disabled`, - message: () => `Sign up disabled. Please contact your administrator.`, - }, - [EAuthErrorCodes.INVALID_PASSWORD]: { - title: `Invalid password`, - message: () => `Invalid password. Please try again.`, - }, - [EAuthErrorCodes.SMTP_NOT_CONFIGURED]: { - title: `SMTP not configured`, - message: () => `SMTP not configured. Please contact your administrator.`, - }, +// const errorCodeMessages: { +// [key in EAuthErrorCodes]: { title: string; message: (email?: string | undefined) => ReactNode }; +// } = { +// // global +// [EAuthErrorCodes.INSTANCE_NOT_CONFIGURED]: { +// title: `Instance not configured`, +// message: () => `Instance not configured. Please contact your administrator.`, +// }, +// [EAuthErrorCodes.SIGNUP_DISABLED]: { +// title: `Sign up disabled`, +// message: () => `Sign up disabled. Please contact your administrator.`, +// }, +// [EAuthErrorCodes.INVALID_PASSWORD]: { +// title: `Invalid password`, +// message: () => `Invalid password. Please try again.`, +// }, +// [EAuthErrorCodes.SMTP_NOT_CONFIGURED]: { +// title: `SMTP not configured`, +// message: () => `SMTP not configured. Please contact your administrator.`, +// }, // email check in both sign up and sign in - [EAuthErrorCodes.INVALID_EMAIL]: { - title: `Invalid email`, - message: () => `Invalid email. Please try again.`, - }, - [EAuthenticationErrorCodes.EMAIL_REQUIRED]: { - title: `Email required`, - message: () => `Email required. Please try again.`, - }, +// [EAuthErrorCodes.INVALID_EMAIL]: { +// title: `Invalid email`, +// message: () => `Invalid email. Please try again.`, +// }, +// [EAuthenticationErrorCodes.EMAIL_REQUIRED]: { +// title: `Email required`, +// message: () => `Email required. Please try again.`, +// }, - // sign up - [EAuthenticationErrorCodes.USER_ALREADY_EXIST]: { - title: `User already exists`, - message: (email = undefined) => ( -