huboard / ghee

This is an unofficial ruby client for the Github API. The end goal is a complete, simple, and intuitive ruby API for all things Github.
http://documentup.com/huboard/ghee
MIT License
160 stars 51 forks source link

sign in or sign up with github. #15

Closed Theodule closed 10 years ago

Theodule commented 11 years ago

How can i use ghee to sign in or sign up with github.

rauhryan commented 11 years ago

I don't think that github allows you to create users from the api, so I believe the only way to sign up is by using github.com

I'm not sure what you mean by "sign in", I'm going to assume you are asking how to authenticate with ghee in ruby.

There are several ways to do that, if you refer to the documentation here:

http://documentup.com/rauhryan/ghee

I show several ways that you can authenticate to the github api using ghee

Theodule commented 11 years ago

"sign in" in my terms means, creating a user or login session on my server using github credentials, like "omniauth-github" or "omniauth-facebook".

rauhryan commented 11 years ago

Here's an example from my site huboard

https://github.com/rauhryan/huboard/blob/master/lib/helpers.rb#L90

basically you just use omniauth-github or warden (or some other gem) to do the OAuth handshake with github and then just create an instance of ghee using the access token from github.

I don't have any of the webserver (rack) specific code do handle retrieving an Auth token from github