-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Customize return URL query form #1709
Conversation
@erwinmombay PTAL |
@dvoytenko can the user change the ret url to be something else besides the current url? |
@erwinmombay User can't change what return URL is - it's AMP that creates it and gives it to publishers to redirect to once they finish their flow. |
sorry, didn't mean user, meant "can the publisher customize the return url to be something else besides the current page url". |
Nope. I meant publisher as well. They actually can't customize any of the vars - we provide all of them :) |
Basically, a publisher says, I want "DOCUMENT_REFERRER" and we inject it. The same with "RETURN_URL", except that if they don't request it, we provide it anyway. You can think of "return" query parameter as a default for this. They can customize the query parameter name, but it will be sent in either case. |
ok, was just thinking if they would need that since redirecting to a different return_url is pretty common in normal pages. that wouldnt be applicable for amp pages? |
They can generally redirect anyway. But we explicitly ask to return to the URL we ask. This is essentially a way for them to return control to us. The ultimate goal, however, is to return back to the document that started the login flow. |
@dvoytenko thanks for explaining LGTM |
Customize return URL query form
Closes #1574.
Few words why UrlReplacements is not used here directly: this code must be sync and it has to be part of the
login-dialog.js
because other methods of login (e.g. via viewer) will use different ways of assigning this value and thus it should propagate asRETURN_URL
in the URL directly.