Skip to content
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

Merged
merged 1 commit into from
Feb 2, 2016
Merged

Conversation

dvoytenko
Copy link
Contributor

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 as RETURN_URL in the URL directly.

@dvoytenko
Copy link
Contributor Author

@erwinmombay PTAL

@erwinmombay
Copy link
Member

@dvoytenko can the user change the ret url to be something else besides the current url?

@dvoytenko
Copy link
Contributor Author

@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.

@erwinmombay
Copy link
Member

sorry, didn't mean user, meant "can the publisher customize the return url to be something else besides the current page url".

@dvoytenko
Copy link
Contributor Author

Nope. I meant publisher as well. They actually can't customize any of the vars - we provide all of them :)

@dvoytenko
Copy link
Contributor Author

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.

@erwinmombay
Copy link
Member

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?

@dvoytenko
Copy link
Contributor Author

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.

@erwinmombay
Copy link
Member

@dvoytenko thanks for explaining LGTM

dvoytenko added a commit that referenced this pull request Feb 2, 2016
Customize return URL query form
@dvoytenko dvoytenko merged commit 9894c96 into ampproject:master Feb 2, 2016
@dvoytenko dvoytenko deleted the access26 branch February 2, 2016 00:59
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.

None yet

3 participants