-
Notifications
You must be signed in to change notification settings - Fork 246
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): Update existing SignUp
object on SignUpContinue
OAuth
#3401
Conversation
🦋 Changeset detectedLatest commit: c1a59fb The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
6eaa364
to
6e5369c
Compare
@@ -175,6 +175,7 @@ function _SignUpContinue() { | |||
<SignUpSocialButtons | |||
enableOAuthProviders={showOauthProviders} | |||
enableWeb3Providers={showWeb3Providers} | |||
continueSignUp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
javascript/packages/clerk-js/src/core/resources/SignUp.ts
Lines 207 to 208 in ff52e79
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.
There was a problem hiding this comment.
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 🙇🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓Shouldn'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.
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
6e5369c
to
c1a59fb
Compare
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 asweb3_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.Type of change