Skip to content

Conversation

@alex-delia
Copy link

  1. Allows optional query params to be passed from the frontend with its success URL. This is useful for users with multiple clients using the same polar instance, ex. Web + Mobile. The extra data is passed to the successURL as a queryParam, where the developer can then redirect the users to the proper application.

  2. Add redirect to portal options. Checkout already allows redirect to be specified on the frontend. With this change the portal can also specify this option and receive the link through authClient.portal()

@changeset-bot
Copy link

changeset-bot bot commented Jan 28, 2026

⚠️ No Changeset found

Latest commit: 15d7192

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@alex-delia alex-delia marked this pull request as draft January 28, 2026 03:52
@alex-delia alex-delia marked this pull request as ready for review January 28, 2026 04:01
@alex-delia alex-delia changed the title Add extra options to client functions Add extra options to better-auth client functions Jan 28, 2026
@pieterbeulque
Copy link
Contributor

Appreciate the PR!

Just rolled out some minor changes that covers the same changes: you can now supply a succesUrl on the fly in authClient.checkout({ successUrl }) + await authClient.customer.portal({ redirect: false }) will now return the generated URL without redirecting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants