{"action":"closed","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/2152","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/2152/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/2152/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/2152/events","html_url":"https://github.com/ampproject/amphtml/issues/2152","id":134974539,"number":2152,"title":"AMP Access Login: RETURN_URL parameter is wrapped in braces, which breaks redirect back to AMP page.","user":{"login":"charlesdavis","id":4714751,"avatar_url":"https://avatars.githubusercontent.com/u/4714751?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesdavis","html_url":"https://github.com/charlesdavis","followers_url":"https://api.github.com/users/charlesdavis/followers","following_url":"https://api.github.com/users/charlesdavis/following{/other_user}","gists_url":"https://api.github.com/users/charlesdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesdavis/subscriptions","organizations_url":"https://api.github.com/users/charlesdavis/orgs","repos_url":"https://api.github.com/users/charlesdavis/repos","events_url":"https://api.github.com/users/charlesdavis/events{/privacy}","received_events_url":"https://api.github.com/users/charlesdavis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"dvoytenko","id":726049,"avatar_url":"https://avatars.githubusercontent.com/u/726049?v=3","gravatar_id":"","url":"https://api.github.com/users/dvoytenko","html_url":"https://github.com/dvoytenko","followers_url":"https://api.github.com/users/dvoytenko/followers","following_url":"https://api.github.com/users/dvoytenko/following{/other_user}","gists_url":"https://api.github.com/users/dvoytenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoytenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoytenko/subscriptions","organizations_url":"https://api.github.com/users/dvoytenko/orgs","repos_url":"https://api.github.com/users/dvoytenko/repos","events_url":"https://api.github.com/users/dvoytenko/events{/privacy}","received_events_url":"https://api.github.com/users/dvoytenko/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-02-19T21:03:26Z","updated_at":"2016-02-20T02:22:54Z","closed_at":"2016-02-20T02:22:54Z","body":"**AMP Access**\r\n\r\nThe RETURN_URL parameter passed to the publisher login page is wrapped in curly braces. For example:\r\n```\r\n?return={https%3A%2F%2Fcdn.ampproject.org%2Fv0%2Famp-login-done-0.1.html%3Furl%3Dhttp%253A%252F%252Fwww.publisher.com%252Famp%252Farticles%252F000001}\r\n```\r\nWhen the login page attempts to redirect the user back to the return URL (i.e. the AMP page), the braces cause the browser to treat the URL as relative. This results in the browser prefixing the href with the login page origin, for example: \r\n```\r\nhttps://amp.publisher.com/%7Bhttps://cdn.ampproject.org/v0/amp-login-done-0.1.html?url=http%3A%2F%2Fwww.publisher.com%2Famp%2Farticles%2F000001%7D#success=true\r\n```"}}