New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: /account/login?redirect_to=/final/url should redirect to /final/url after authn #1950
Conversation
@@ -193,7 +193,7 @@ export function getStaticProps() { | |||
props: { | |||
title: 'Payment', | |||
isRestricted: true, | |||
redirectTo: '/login/', | |||
redirectTo: '/login/?redirect_uri=/account/payment', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should just be /account/payment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redirectTo is where the http response will redirect to when the end-user isn't authenticated. This page is served at /account/payment. If redirect_to=/account/payment, it would be an infinite redirect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, I misunderstood what was happening there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- redirectTo
works a lot differently than i was expecting 😲
🤖 I have created a release *beep* *boop* --- ## [2.22.0](website-v2.21.2...website-v2.22.0) (2022-09-29) ### Features * /account/login?redirect_to=/final/url should redirect to /final/url after authn ([#1950](#1950)) ([2bbe6de](2bbe6de)) * create page for service level agreement ([#1955](#1955)) ([6525845](6525845)) * early adopter UI ([#1959](#1959)) ([1affae3](1affae3)) * homepage (index) copy for pricing changes ([#1942](#1942)) ([f2084a3](f2084a3)) * new users are initialized into free tier ([#1945](#1945)) ([ee67c35](ee67c35)) * pricing page (for tiered pricing) ([#1894](#1894)) ([3f0db86](3f0db86)) * revert "fix: rm menu item from global account menu" ([#1951](#1951)) ([2f84754](2f84754)) * update preview summary metadata ([#1965](#1965)) ([a47949c](a47949c)) * update terms of service ([#1964](#1964)) ([dd810b9](dd810b9)) * update the web3storage product page (for tiered pricing) ([#1957](#1957)) ([03a6422](03a6422)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Motivation:
What this does
/account/login?redirect_uri=/account/payment
so the /pricing page can link to /account/payment