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

Remove Github token from browser history #364

Merged
merged 1 commit into from
Jul 19, 2019
Merged

Conversation

RaeesBhatti
Copy link
Contributor

- Summary

Remove GitHub token from URL (query parameters) by using history.replaceState, so that, it won't be stored in browser's history.

- Test plan

  • Remove your Github credentials from ~/.netlify/config.json
  • Do netlify init for a project with Github as remote
  • Chose to sign in to Github via app.netlify.com
  • Authorize
  • Check the browser's URL after you're redirected back to localhost

- Description for the changelog

  • Use history.replaceState to remove query parameters from URL on the page we serve from localhost

- A picture of a cute animal (not mandatory but encouraged)
hedgehog-animal-baby-cute-50577

@DavidWells
Copy link
Contributor

looks good to me.

Hashes (#token=xyz) wouldn't work for this local dev server right?

@RaeesBhatti
Copy link
Contributor Author

RaeesBhatti commented Jul 19, 2019

Yes, URL fragments are not included in HTTP requests.

@RaeesBhatti RaeesBhatti merged commit b0144b9 into master Jul 19, 2019
@RaeesBhatti RaeesBhatti deleted the raees/token-protection branch July 19, 2019 21:50
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

2 participants