The goal is to create an application able to perform authentication via social networks with the help of the OAuth 2 protocol.
Here is a simple overview of what the application will perform when a user visits the application homepage and tries to authenticate with a social network:
- User clicks “Login” link.
- User is redirected to the social network’s website. The application data (client_id) are sent along for identification.
- User sees the application details (like name, logo, description, and any additional data needed) and which actions it would like to perform on its behalf (the scope).
- If the user does not trust the application, they will cancel the authorization.
- If the user trusts the application, the authorization is approved and the user is redirected back to the application(via callback URL).
- Right the application work with Twitter only (will eventually implement with additional social networks)
- Clone the repo down
git clone https://github.com/rsbarbo/oauth2.git
- Run
bundle install
- Run
rake db:setup
- Start a local server with
rails server
- Visit your localhost page
http://localhost:3000/
- Have some fun with this silly app