megachangelog
Improvement4.36.0

@clerk/shared@4.36.0

Added a dedicated blocked request screen in SignIn/SignUp components with support reference details. Fixed enterprise SSO sign-ins that were failing with verification challenges, and improved error handling to expose traceId and metadata in action_blocked errors.

Minor Changes

  • <SignIn /> and <SignUp /> show a dedicated screen when a request is blocked, with a reference the user can quote to support. (#9600) by @zourzouvillys

    action_blocked errors now expose traceId, title, description, linkUrl, linkText, kind and data on meta.

Patch Changes

  • Fix enterprise SSO sign-ins erroring instead of showing a verification challenge raised while handing off to the identity provider. (#9619) by @zourzouvillys

    If you use the prebuilt <SignIn /> component, there is nothing to do. If you have Clerk Protect enabled and call signIn.authenticateWithRedirect() or signIn.authenticateWithPopup() from a custom sign-in flow, catch a ClerkRuntimeError with code protect_check_required and show the verification challenge, to avoid a stalled sign-in.

    That error means a verification challenge has to be completed before the sign-in can redirect. It replaces the generic "not supported" error these methods threw before. When it is thrown, the sign-in is gated: signIn.protectCheck is set, or its status is needs_protect_check. For enterprise SSO, run the challenge and then call authenticateWithRedirect() again with continueSignIn: true. If the server has already prepared the redirect, the sign-in continues to the identity provider and the challenge runs when it returns, so no error is thrown.

  • Run a sign-up's verification challenge before handing off to an enterprise connection, matching the order used elsewhere in the flow. (#9622) by @zourzouvillys

authssocomponentserror-handling

Source: original entry ↗