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): Propagate redirectUrl when continuing sign up with missing identifier #4542

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented Nov 12, 2024

Description

When SSO connections return no email claim, users are correctly prompted for their email but encounter an error due to missing action_complete_redirect_url during submission.

We should continue to sign up by calling completeSignUpFlow with the redirectUrl so that it can call the SSO callback correctly.

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:

Fixes ORGS-328

@LauraBeatris LauraBeatris changed the title fix: Persist redirectUrl on sign up continue fix: Propagate redirectUrl when continuing sign up with missing identifier Nov 12, 2024
@LauraBeatris LauraBeatris changed the title fix: Propagate redirectUrl when continuing sign up with missing identifier fix(clerk-js) Propagate redirectUrl when continuing sign up with missing identifier Nov 12, 2024
@LauraBeatris LauraBeatris changed the title fix(clerk-js) Propagate redirectUrl when continuing sign up with missing identifier fix(clerk-js): Propagate redirectUrl when continuing sign up with missing identifier Nov 12, 2024
@LauraBeatris LauraBeatris changed the title fix(clerk-js): Propagate redirectUrl when continuing sign up with missing identifier fix(clerk-js): Propagate redirectUrl when continuing sign up with missing identifier Nov 12, 2024
@LauraBeatris LauraBeatris self-assigned this Nov 12, 2024
@@ -150,6 +152,9 @@ function _SignUpContinue() {
card.setLoading();
card.setError(undefined);

const redirectUrl = buildSSOCallbackURL(ctx, displayConfig.signUpUrl);
const redirectUrlComplete = ctx.afterSignUpUrl || '/';
Copy link
Member

Choose a reason for hiding this comment

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

🙃 I believe we already properly resolve this inside the RedirectUrls class

Suggested change
const redirectUrlComplete = ctx.afterSignUpUrl || '/';
const redirectUrlComplete = ctx.afterSignUpUrl

@@ -150,6 +152,9 @@ function _SignUpContinue() {
card.setLoading();
card.setError(undefined);

const redirectUrl = buildSSOCallbackURL(ctx, displayConfig.signUpUrl);
Copy link
Member

Choose a reason for hiding this comment

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

I see that we do this constantly, does it make sense to move it inside useSignUpContext ?

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.

3 participants