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

Avoid redirecting to localhost during authorization flow #650

Merged
merged 1 commit into from
Mar 16, 2020

Conversation

mislav
Copy link
Contributor

@mislav mislav commented Mar 13, 2020

Web developers who have had at any previous point ran an application on http://localhost that enabled HSTS (HTTP Strict Transport Security) will find themselves unable to authenticate because their browser (typically Safari) will keep redirecting them to https://localhost, which isn't handled by our local server.

This switches the authorization callback to be to 127.0.0.1, which should be equivalent to localhost, but not subject to HSTS.

The GitHub CLI OAuth apps have been edited to add http://127.0.0.1/callback as an additional allow-listed callback URL. /cc @ptoomey3

Fixes #616

Web developers who have previously ran an application on
`http://localhost` that enabled HSTS (HTTP Strict Transport Security)
will find themselves unable to authenticate because their browser
(typically Safari, in practice) will keep redirecting them to
`https://localhost`, which isn't handled by our local server.

This switches the authorization callback to be to `127.0.0.1`, which
should be equivalent to `localhost`, but not subject to HSTS.
@mislav mislav merged commit da4bbe3 into master Mar 16, 2020
@mislav mislav deleted the oauth-localhost-callback branch March 16, 2020 14:08
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.

Unable to authenticate
2 participants