Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

jhohlfeld/oauth-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#OAuth browser

Experiment on the OAuth 2.0 protocol.

You find a demo page here.

OAuth lets the user of your web application authenticate using a third party service. A number of OAuth service providers already exist - for instance Google Plus, Facebook, Twitter, GitHub, Stackexchange.

The goal of this experiment is to find out which providers are out there offering the service and how I can use the provider's api in each case. Though the protocol is very clear and simple, it's also very flexible and unrestrictive. Different providers implement the protocol to different grades, sometimes using different declarations etc.

To showcase each providers capabilities, I created a unified interface based on backbone, bootstrap and requirejs. There are already some simple views that let the user log in and show some limited profile information from the selected provider.

In a first step, I will cover the providers that offer webclient-only, implicit grant flow. After that, I'll implement some server modules for each of the providers that restrain to offer authorization coder grant flow.

##Roadmap

For roadmap and progress information see my Trello Project Board.

##Getting started

Clone the repository

$ git clone git@github.com:jhohlfeld/oauth-browser.git
$ cd oauth-browser

You will need node.js and grunt to run the application. Read the respective documentation to get both running, if not already done.

Now your'e good to go. Install required dependencies (node gives you npm wheras successfull npm install gives you bower):

$ npm install
$ bower install

With the next command, required 3rd party libs are installed into src/lib/ directory. Them less gets compiled into src/css - that's what we use grunt for:

$ grunt dev

For now, we'll serve from src/ dir. There is a server for development purposes written in javascript:

$ cd src/
$ node server.js &

The server will start on localhost:4000, where you can view the rendered pages. To actually use this service, please read ahead:

Windows Live

Windows Live requires a unique auth redirect url other than localhost:4000. You have to set it to something more globally recognizable.

As of now, we configured this application with http://dev.peoplepool.netronaut.de:4000/. To use this domain locally, you have to update your machine's hosts config. Under linux this would be:

$ cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	dev.peoplepool.netronaut.de

As a matter of fact, due to the limitations of windows live, we decided to take this route for all our providers. As many providers (GitHub for instance) do not allow to configure multiple redirect uris (as Google Plus does), we have to pick a host name that works for apis.

About

Experiment on OAuth 2.0 capabilities of different api providers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published