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

feat(clerk-js): Handle user_locked error during oauth flow with redir… #2019

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

yourtallness
Copy link
Contributor

@yourtallness yourtallness commented Nov 2, 2023

…ect to /sign-up or /sign-in

Description

When an oauth flow is started while a user is locked, we will get a user_locked error.

The user will be identified, but after discussing with @desiprisg, we decided to redirect to /sign-up or /sign-in so that the SignUp or SignIn are reset.

We currently cannot offer the best UX from /sign-in/factor-one because the oauth identification does not display nicely in the <IdentityPreview /> component (the identifier is null).

Thus for now we opted to restart the flow at step 1.

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:

Packages affected

  • @clerk/backend
  • @clerk/chrome-extension
  • @clerk/clerk-js
  • @clerk/clerk-expo
  • @clerk/fastify
  • gatsby-plugin-clerk
  • @clerk/localizations
  • @clerk/nextjs
  • @clerk/clerk-react
  • @clerk/remix
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/themes
  • @clerk/types
  • build/tooling/chore

Copy link

changeset-bot bot commented Nov 2, 2023

🦋 Changeset detected

Latest commit: 9dd106a

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

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo 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

@yourtallness yourtallness force-pushed the yourtallness/handle_oauth_user_locked branch from ac95ef6 to 69b011a Compare November 2, 2023 16:35
Copy link
Contributor

@SokratisVidros SokratisVidros left a comment

Choose a reason for hiding this comment

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

🔒

Copy link
Member

@panteliselef panteliselef left a comment

Choose a reason for hiding this comment

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

Shall we add a test for displaying the error in SignUpStart ?

@panteliselef
Copy link
Member

@yourtallness is this something we need to backport to v4 ?

@yourtallness
Copy link
Contributor Author

Shall we add a test for displaying the error in SignUpStart ?

This is pre-existing behaviour, but I'll take a look.

@yourtallness
Copy link
Contributor Author

@yourtallness is this something we need to backport to v4 ?

@SokratisVidros @nikosdouvlis WDYT?

@yourtallness yourtallness force-pushed the yourtallness/handle_oauth_user_locked branch from 69b011a to 9dd106a Compare November 7, 2023 11:41
@yourtallness yourtallness added this pull request to the merge queue Nov 7, 2023
Merged via the queue into main with commit d1b524f Nov 7, 2023
7 checks passed
@yourtallness yourtallness deleted the yourtallness/handle_oauth_user_locked branch November 7, 2023 11:57
yourtallness added a commit that referenced this pull request Nov 7, 2023
…ect to /sign-up or /sign-in (#2019)

(cherry picked from commit d1b524f)
github-merge-queue bot pushed a commit that referenced this pull request Nov 7, 2023
…ect to /sign-up or /sign-in (#2019) (#2071)

(cherry picked from commit d1b524f)

Co-authored-by: Mark Pitsilos <mark.pitsilos@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants