paulirish / github-email

Get a GitHub user's email. :sunglasses: Use this responsibly.
https://www.npmjs.com/package/github-email
998 stars 111 forks source link

add auth flow to get github email #8

Closed paulirish closed 5 years ago

paulirish commented 6 years ago

@fpg1503 what do you think about this:

now when running you see this:

untitled-2 fw

and after following instructions..

untitled-3 fw

The text:

Github requires authenticated API requests to retrieve the email. See: https://git.io/vxctz To enable, open https://github.com/settings/tokens/new?description=github-email … Keep the checkboxes unchecked, hit 'Generate token', copy the token, then run this in your shell: export GH_EMAIL_TOKEN=<token>

wdyt? fixes #7

fpg1503 commented 6 years ago

The only issue I can see is that exporting the token will only work for the current session, maybe you should instruct on adding the export to .bashrc or .zshrc

paulirish commented 6 years ago

Yah true. That was kind of implied. Was trying to keep the text brief. :)

fpg1503 commented 6 years ago

Do you think asking for the token and automatically adding the export command to .bashrc/.zshrc is too intrusive?