fix(nextjs): resolve the hosted sign-up page for the redirect-based sign-up - #556
Open
DonOmalVindula wants to merge 1 commit into
Open
fix(nextjs): resolve the hosted sign-up page for the redirect-based sign-up#556DonOmalVindula wants to merge 1 commit into
DonOmalVindula wants to merge 1 commit into
Conversation
…ign-up SignUpButton and useAsgardeo().signUp() did nothing unless a custom signUpUrl was configured: signUpAction returned an empty URL and the client threw "Not implemented" for a non-embedded sign-up. - AsgardeoNextClient.getSignUpUrl() returns the configured signUpUrl, or the identity server's self-registration page derived from baseUrl, clientId and applicationId (getRedirectBasedSignUpUrl), as the React SDK does. - signUpAction hands that URL to the browser, which navigates there, and reports an error when no URL can be resolved instead of silently doing nothing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 32 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🦋 Changeset detectedThe changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
<SignUpButton />without a configuredsignUpUrl, anduseAsgardeo().signUp(), did nothing:signUpActionreturned{signUpUrl: ''}for a non-embedded sign-up (the client provider ignores an empty URL), andAsgardeoNextClient.signUp(options)threw "Not implemented". The React SDK navigates to the identity server's self-registration page built bygetRedirectBasedSignUpUrl(config), which@asgardeo/javascriptalready exports.Fix
AsgardeoNextClient.getSignUpUrl()returns the configuredsignUpUrl, or the self-registration page derived frombaseUrl,clientIdandapplicationId(https://accounts.asgardeo.io/t/<org>/accountrecoveryendpoint/register.do?client_id=...&spId=...for Asgardeo).signUpActionwithout a payload returns that URL; the client provider's existingnavigateTotakes the browser there. When no URL can be resolved (for example a custom domain withoutsignUpUrl) the action reports an error that namessignUpUrl/NEXT_PUBLIC_ASGARDEO_SIGN_UP_URL, instead of a silent no-op.signUp(options)on the server-side client still throws, since it cannot navigate, but the message now points atgetSignUpUrl(). The action's JSDoc no longer describes sign-in.Testing
signUpActiontests (redirect URL, unresolvable URL, incomplete embedded step, completed flow with auto sign-in) andgetSignUpUrltests (derived Asgardeo URL, configuredsignUpUrlwins, unrecognised base URL); 68 tests pass.pnpm lintandtsc --noEmitfor@asgardeo/nextjs.Changeset included (
@asgardeo/nextjspatch).🤖 Generated with Claude Code