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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(clerk-js): Update existing SignUp object on SignUpContinue OAuth #3401

Merged
merged 1 commit into from
May 21, 2024

Conversation

LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented May 17, 2024

Description

Resolves SDK-1689 - fixes Web3 sign-up flow with social connections.

The SDK was creating a new SignUp object on OAuth callback when continuing a signup flow, overriding properties such as web3_wallet.

Instead of creating a new SignUp object, it should update the existing one.

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:

@LauraBeatris LauraBeatris self-assigned this May 17, 2024
Copy link

changeset-bot bot commented May 17, 2024

馃 Changeset detected

Latest commit: c1a59fb

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 Patch
@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

@LauraBeatris LauraBeatris marked this pull request as ready for review May 17, 2024 17:47
@LauraBeatris LauraBeatris requested a review from a team May 17, 2024 17:47
@@ -175,6 +175,7 @@ function _SignUpContinue() {
<SignUpSocialButtons
enableOAuthProviders={showOauthProviders}
enableWeb3Providers={showWeb3Providers}
continueSignUp
Copy link
Member Author

Choose a reason for hiding this comment

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

const authenticateFn = (args: SignUpCreateParams | SignUpUpdateParams) =>
continueSignUp && this.id ? this.update(args) : this.create(args);

Since continueSignUp wasn't being provided, then a new SignUp object was created on the redirect.

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 might be missing other flows here and this could end up introducing side effects, so please let me know 馃檱馃徎

Copy link
Member

Choose a reason for hiding this comment

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

鉂揝houldn't the absence of continueSignUp create issues for the rest of oath providers ? Did we verify that those were failing as well, because if they were successful that would seem weird.

Copy link
Member Author

Choose a reason for hiding this comment

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

create issues for the rest of oath providers

Good point, I haven't verified yet - what are other flows that someone could fall on ContinueSignUp?

Copy link
Member

Choose a reason for hiding this comment

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

We have verified (offline) that flows work as expected

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.

馃挴

@LauraBeatris LauraBeatris enabled auto-merge (squash) May 21, 2024 16:37
@LauraBeatris LauraBeatris merged commit 62f8af2 into main May 21, 2024
10 checks passed
@LauraBeatris LauraBeatris deleted the fix-sign-up-continue branch May 21, 2024 17:33
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.

None yet

3 participants