Skip to content

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

Merged
yourtallness merged 1 commit into
mainfrom
yourtallness/handle_oauth_user_locked
Nov 7, 2023
Merged

feat(clerk-js): Handle user_locked error during oauth flow with redir…#2019
yourtallness merged 1 commit into
mainfrom
yourtallness/handle_oauth_user_locked

Conversation

@yourtallness

@yourtallness yourtallness commented Nov 2, 2023

Copy link
Copy Markdown
Contributor

…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

@yourtallness
yourtallness requested a review from a team as a code owner November 2, 2023 16:24
@changeset-bot

changeset-bot Bot commented Nov 2, 2023

Copy link
Copy Markdown

🦋 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

@SokratisVidros SokratisVidros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒

@panteliselef panteliselef left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@yourtallness

Copy link
Copy Markdown
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
Copy Markdown
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
@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