Skip to content

anvaka/githuboauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

githuboauth

Github oauth directive. Allows users of your website to authorize with GitHub.

Why?

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.

usage

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.

install

With npm do:

npm install githuboauth

license

MIT

About

github oauth directive

Resources

License

Stars

Watchers

Forks

Packages

No packages published