Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(clerk-js): Improve UX for recoverable actions in ConnectedAccounts #3723

Conversation

panteliselef
Copy link
Member

@panteliselef panteliselef commented Jul 15, 2024

Description

Before

image

Now, when user needs to reauthorize/reconnect

Unify the errors for reauthorization vs attempting to create a new external account for the user. UX-wise the user will have to take the same action in order to recover, so we should not overwhelm them with information that is clearly more useful to developers than end users
image

and on mobile
image

Now, not recoverable state

If an error indicate that the user cannot recover, only then show the text in red. Without the "requires action" badge
image

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented Jul 15, 2024

🦋 Changeset detected

Latest commit: 24d20bc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@clerk/localizations Minor
@clerk/clerk-js Minor
@clerk/types Minor
@clerk/astro Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch
@clerk/shared Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/themes Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@panteliselef panteliselef changed the title Elef/user 213 make error user friendly when refresh token does not exist fix(clerk-js): Improve UX for recoverable actions in ConnectedAccounts Jul 15, 2024
@panteliselef panteliselef self-assigned this Jul 15, 2024
@panteliselef panteliselef force-pushed the elef/user-213-make-error-user-friendly-when-refresh-token-does-not-exist branch from 688bff2 to f37d01b Compare July 15, 2024 20:45
@panteliselef panteliselef marked this pull request as ready for review July 18, 2024 11:47
@@ -458,6 +458,7 @@ export const enUS: LocalizationResource = {
'Sign up unsuccessful due to failed security validations. Please refresh the page to try again or reach out to support for more assistance.',
captcha_unavailable:
'Sign up unsuccessful due to failed bot validation. Please refresh the page to try again or reach out to support for more assistance.',
external_account_missing_refresh_token: 'This account has been disconnected',
Copy link
Member

Choose a reason for hiding this comment

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

A better message might be the following:
This account is missing a refresh token or There is no associated refresh token with this account

Maybe we need to provide the steps that the user needs to do in order to resolve this e.g. Try to reconnect your account or sign in

Copy link
Member Author

Choose a reason for hiding this comment

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

I understand were you are coming from, but we are explicitly using a very simple message here, because this is something the end user will see. I am confident that unless you are a developer you are not aware of what a "refresh token" is, so the error message would not be that useful to you.

@@ -305,6 +305,10 @@ export const arSA: LocalizationResource = {
title: 'التحقق من البريد الإلكتروني',
},
emailLink: {
clientMismatch: {
Copy link
Member

Choose a reason for hiding this comment

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

❓ Are these changes related to connected accounts?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, i had to run the script that autogenerates all other localization with undefined but seems like when clientMismatch was added we never run this. It will be a lot manual work to revert them, and they are not causing any harm.

@nikosdouvlis nikosdouvlis merged commit b2788f6 into main Jul 19, 2024
12 of 16 checks passed
@nikosdouvlis nikosdouvlis deleted the elef/user-213-make-error-user-friendly-when-refresh-token-does-not-exist branch July 19, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants