Skip to content

Conversation

@brkalow
Copy link
Member

@brkalow brkalow commented Nov 8, 2024

Description

Introduces support for <SignIn.Captcha> as well as <SignIn.Step name='sso-callback'>. This allows rendering of the CAPTCHA widget when a sign in flow is transferred to a sign up flow.

Also fixes a bug with the SSO callback where a successful auth would navigate to the incorrect URL. This was due to a recent change that switched to passing a URL directly to setActive(), instead of beforeEmit.

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:

@changeset-bot
Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: 3f5b954

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

This PR includes changesets to release 2 packages
Name Type
@clerk/elements Minor
@clerk/ui 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

Comment on lines -81 to -84
signInForceRedirectUrl: ClerkJSNavigationEvent.complete,
signInFallbackRedirectUrl: ClerkJSNavigationEvent.complete,
signUpForceRedirectUrl: ClerkJSNavigationEvent.complete,
signUpFallbackRedirectUrl: ClerkJSNavigationEvent.complete,
Copy link
Member Author

Choose a reason for hiding this comment

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

Now that we're not passing beforeEmit to setActive internally, our custom navigate hackery wasn't working as intended here. Removing the URLs allows navigate to complete.

Copy link
Member

Choose a reason for hiding this comment

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

Does this mean we broke the usage of handleRedirectCallback for everyone ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@panteliselef for elements, yes 😅

Choose a reason for hiding this comment

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

Hey, trying to use <SignIn.Captcha /> but I see Property 'Captcha' does not exist ....

I believe you forgot to export this component in index.ts right?

Copy link
Member

Choose a reason for hiding this comment

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

@corentinmusard yes, good catch. PR here #4548

@brkalow brkalow requested a review from alexcarpenter November 8, 2024 04:05
@brkalow brkalow merged commit f030f6f into main Nov 8, 2024
28 checks passed
@brkalow brkalow deleted the brk.feat/elements-sign-in-sso-callback branch November 8, 2024 16:17
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.

6 participants