Skip to content

Commit

Permalink
ux: improve message for oauthaccountnotlinked
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Aug 24, 2024
1 parent 78272a3 commit 6486daf
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/pages/auth/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ export default function Page() {
let errorMessage: React.ReactNode = 'Unexpected sign in error'
switch (String(error).toLowerCase()) {
case 'verification':
errorMessage = 'Sign In token is invalid, expired or has been already used'
errorMessage = 'Sign In token is invalid, expired or has been already used.'
break
case 'emailsignin':
errorMessage = 'Cannot send the Sign In link at this time due to an internal error. Please try again later.'
break
case 'oauthaccountnotlinked':
errorMessage = 'The OAuth account might be already linked to another user'
break
case 'emailsignin':
errorMessage = 'Cannot send the Sign In link at this time due to an internal error. Please try again later.'
errorMessage =
'The email of this OAuth provider is already linked to another account. Please use Sign In via Email to login with that account.'
break
default:
errorMessage = <>Unexpected sign up error{error ? <i>{`: ${error}`}</i> : ''}</>
Expand All @@ -41,8 +39,7 @@ export default function Page() {
<div className={'page-container bordered-container inner-blueberry text-center'}>
<h2>Sign In Error</h2>
<p>{errorMessage}</p>
<p>Try logging in again.</p>
<ButtonInternalLink href={Routes.Login}>Login</ButtonInternalLink>
<ButtonInternalLink href={Routes.Login}>Go to Login</ButtonInternalLink>
</div>
</article>
</div>
Expand Down

1 comment on commit 6486daf

@vercel
Copy link

@vercel vercel bot commented on 6486daf Aug 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.