This app is an example to demonstrate how to make a simple oauth2 server provider with OAuth2orize.
$ mkdir ~/projects
$ cd ~/projects
$ git clone [email protected]:joaoneto/oauth2orize-example.git
$ cd oauth2orize-example
$ npm install
» use oauth2orize
» db.users.insert({name: "Foo Bar", "email": "[email protected]", password: "123"})
» db.users.find()
{ "_id" : ObjectId("XXXXXXXXXXXXXXXXXXXXXXXX"), "name" : "Foo Bar", "email" : "[email protected]", "password" : "123" }
» db.clients.insert({user_id: ObjectId("XXXXXXXXXXXXXXXXXXXXXXXX"), secret:"abc123", redirect_uri:"http://localhost:3000"})
Edit client_oauth.sh
(gist)
Change CLIENT_ID="XXXXXXXXXXXXXXXXXXXXXXXX"
, replace X with your client_id.
$ node server
$ ./client_oauth.sh