Skip to content

feat(portal-url): accept return_to param for stale-tab recovery - #2

Merged
rrader26 merged 1 commit into
mainfrom
feat/portal-url-return-to-param
May 23, 2026
Merged

feat(portal-url): accept return_to param for stale-tab recovery#2
rrader26 merged 1 commit into
mainfrom
feat/portal-url-return-to-param

Conversation

@rrader26

Copy link
Copy Markdown

Lets the host app pass ?return_to= when minting a customer portal URL. The generated URL embeds it as a query param so lago-front (separate PR) can bounce the user back when the JWT expires.

Behavior

Companion PRs

Test plan

  • GET /customers/:id/portal_url?return_to=https://example.com → URL includes ?return_to=https%3A%2F%2Fexample.com
  • GET /customers/:id/portal_url (no param) → URL has no query string
  • Special chars in return_to are properly CGI.escape'd

Lets the host app pass ?return_to=<app-url> when minting a customer
portal URL. The generated URL embeds it as a query param so lago-front
(separate PR) can bounce the user back when the JWT expires.

Backward-compatible: clients that don't pass return_to get the same URL
shape as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rrader26
rrader26 merged commit 4b7014f into main May 23, 2026
2 of 12 checks passed
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.

1 participant