Skip to content

Commit

Permalink
Update to display more generic sign in error message and provide deta…
Browse files Browse the repository at this point in the history
…ils through console error.
  • Loading branch information
jbouder committed Aug 21, 2024
1 parent 6a1f073 commit 9e383fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/hooks/use-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const useAuth = () => {
if (auth.error) {
setError(auth.error.message);
setIsSignedIn(false);

// eslint-disable-next-line no-console
console.error('Error:', auth.error);
}
}, [auth.error, setIsSignedIn]);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/sign-in/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const SignIn = (): React.ReactElement => {
<h1>Sign In</h1>
{error && (
<Alert id="loginAlert" type="error" heading="Error">
Incorrect email or password was entered.
There was an error signing in. Please try again.
</Alert>
)}
<Form id="login-form" onSubmit={handleSubmit(onSubmit)}>
Expand Down

0 comments on commit 9e383fe

Please sign in to comment.