diff --git a/apps/browser-extension/src/SignInPage.tsx b/apps/browser-extension/src/SignInPage.tsx index f1899d5a..1d849028 100644 --- a/apps/browser-extension/src/SignInPage.tsx +++ b/apps/browser-extension/src/SignInPage.tsx @@ -80,11 +80,7 @@ export default function SignInPage() { break; } if (loginError) { - if (loginError.data?.code == "UNAUTHORIZED") { - errorMessage = "Wrong username or password"; - } else { - errorMessage = loginError.message; - } + errorMessage = loginError.message || "Wrong username or password"; } return ( diff --git a/apps/web/components/signin/CredentialsForm.tsx b/apps/web/components/signin/CredentialsForm.tsx index a35b768f..04d8e1a8 100644 --- a/apps/web/components/signin/CredentialsForm.tsx +++ b/apps/web/components/signin/CredentialsForm.tsx @@ -35,6 +35,8 @@ function SignIn() { const [signinError, setSigninError] = useState(""); const router = useRouter(); const searchParams = useSearchParams(); + const clientConfig = useClientConfig(); + const oAuthError = searchParams.get("error"); if (oAuthError && !signinError) { setSigninError(`${OAUTH_FAILED} ${oAuthError}`); @@ -44,6 +46,14 @@ function SignIn() { resolver: zodResolver(signInSchema), }); + if (clientConfig.auth.disablePasswordAuth) { + return ( +
+ Password authentication is currently disabled. +
+ ); + } + return (