Github oauth directive. Allows users of your website to authorize with GitHub.
I started doing this to enable github on graph drawing libraries repository. Turns out complexity of "full client side" approach was too high. At the end I stopped using this repository. Instead I switched from to client-server architecture, where Heroku app pulls all information from github and returns cached responses for the frontend.
Just keep in mind: there are better alternatives to GitHub authorization problem.
In your html code:
<githuboauth clientId='b5926508f327fb8bd01b'
oauthProxy='//ghoauth.herokuapp.com/authenticate/[code]'>
</githuboauth>
See demo for end to end example.
Unfortunatly GitHub does not provide a way to authenticate securily via client side only. This means the directive requires to have oauth proxy to trade your app's client secret for an access token.
Fear not, seting up oauth proxy is pretty straigtforward. Please check instructions for anvaka/gatepicker.
With npm do:
npm install githuboauth
MIT