All Projects → reneweb → Oauth2orize_resource_owner_password_example

reneweb / Oauth2orize_resource_owner_password_example

Licence: mit
This is an example of the oAuth resource owner password flow using oauth2orize, express 4 and mongoDB.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Oauth2orize resource owner password example

Mevn Boilerplate
A fullstack boilerplate with Mongo, ExpressJS, VueJS and NodeJS.
Stars: ✭ 277 (+793.55%)
Mutual labels:  mongodb, expressjs
Youtube Clone Nodejs Api
VueTube is a YouTube clone built with nodejs, expressjs & mongodb. This is the RESTful API repository.
Stars: ✭ 441 (+1322.58%)
Mutual labels:  mongodb, expressjs
Mern Social
A MERN stack based social media application [Full-Stack React Projects]
Stars: ✭ 288 (+829.03%)
Mutual labels:  mongodb, expressjs
Bookmarks.dev
Bookmarks and Code Snippets Manager for Developers & Co
Stars: ✭ 218 (+603.23%)
Mutual labels:  mongodb, expressjs
Project mern memories
This is a code repository for the corresponding video tutorial. Using React, Node.js, Express & MongoDB you'll learn how to build a Full Stack MERN Application - from start to finish. The App is called "Memories" and it is a simple social media app that allows users to post interesting events that happened in their lives.
Stars: ✭ 747 (+2309.68%)
Mutual labels:  mongodb, expressjs
Builderbook
Open source web application to learn JS stack: React, Material-UI, Next.js, Node.js, Express.js, Mongoose, MongoDB database.
Stars: ✭ 3,015 (+9625.81%)
Mutual labels:  mongodb, expressjs
Practicalnode
Practical Node.js, 1st and 2nd Editions [Apress] 📓
Stars: ✭ 3,694 (+11816.13%)
Mutual labels:  mongodb, expressjs
Mevn Stack
A Quickstart for building an Express API with a VueJS Admin Portal
Stars: ✭ 178 (+474.19%)
Mutual labels:  mongodb, expressjs
Rest Api Nodejs Mongodb
A boilerplate for REST API Development with Node.js, Express, and MongoDB
Stars: ✭ 672 (+2067.74%)
Mutual labels:  mongodb, expressjs
Madclones
A collection of frameworks that I love with a strong focus on clean code, testing, software architecture/design and devops.
Stars: ✭ 480 (+1448.39%)
Mutual labels:  mongodb, expressjs
Angular2 Express Mongoose Gulp Node Typescript
AngularJS 2 (Updated to 4.2.0) Mean Stack application which uses Angular2, Gulp, Express, Node, MongoDB (Mongoose) with Repository Pattern Business Layer
Stars: ✭ 201 (+548.39%)
Mutual labels:  mongodb, expressjs
Awesome Javascript Interviews
Popular JavaScript / React / Node / Mongo stack Interview questions and their answers. Many of them, I faced in actual interviews and ultimately got my first full-stack Dev job :)
Stars: ✭ 939 (+2929.03%)
Mutual labels:  mongodb, expressjs
Mern Marketplace
A MERN stack based online marketplace application [Full-Stack React Projects]
Stars: ✭ 194 (+525.81%)
Mutual labels:  mongodb, expressjs
Nest Mean
NestJS Tutorial Repository
Stars: ✭ 250 (+706.45%)
Mutual labels:  mongodb, expressjs
Express Es6 Starter
Starter project for creating a MVC express server with MongoDB
Stars: ✭ 178 (+474.19%)
Mutual labels:  mongodb, expressjs
Vue Nodejs Youtube Clone
This is the frontend (VueJS) of the Youtube clone called VueTube.
Stars: ✭ 314 (+912.9%)
Mutual labels:  mongodb, expressjs
Axion Technologies Hnh
Hotter’n Hell Hundred is the largest one hundred mile cycling events in the United States and the world. Held in Wichita Falls, TX, this event brings thousands of registrants within the city limits, resulting in a spike in revenue throughout local businesses, restaurants, and hotels, and overall for the city of Wichita Falls. There are several sub-events within the Hotter’n Hell Hundred, such as different races, dining events, consumer shows and a medical symposium. The proposed Hotter’n Hell Hundred mobile application serves as the ultimate source of information for the events, enabling users to quickly register for events and explore local places. In addition, the mobile application allows users to navigate through race during the event, tracking their speed, nearby rest stops, alternate routes, and finish line, ensuring the best possible experience during their stay in Wichita Falls.
Stars: ✭ 155 (+400%)
Mutual labels:  mongodb, expressjs
Mern
🌐 MERN stack 2.0 - MongoDB, Express, React/Redux, Node
Stars: ✭ 175 (+464.52%)
Mutual labels:  mongodb, expressjs
Curriculum
Dive into our 7-month web development program covering HTML, CSS, Javascript, Node, and React!
Stars: ✭ 453 (+1361.29%)
Mutual labels:  mongodb, expressjs
Mean Angular5 Passport Authentication
Securing MEAN Stack (Angular 5) Web Application using Passport Authentication
Stars: ✭ 24 (-22.58%)
Mutual labels:  mongodb, expressjs

oauth2orize_resource_owner_password_example

This is an example of the oAuth resource owner password flow using oauth2orize, express 4 and mongoDB.

Installation
git clone https://github.com/reneweb/oauth2orize_resource_owner_password_example.git
npm install
node app.js

Note: You may need to change the database configuration in the db.js file, if mongoDB doesn't run using the default port or is not running on localhost.

Usage (with cURL)
0 - Create a client

First of all you need to create a client in the clients collection, for example, with the mongo shell. The client should have a clientId, a clientSecret and it should be a trustedClient. For example: {"clientId" : "test", "clientSecret" : "secret", "trustedClient" : true}

1 - Register a user
curl -v -H "Content-Type: application/json" -X POST <IP>:<PORT>/users -d '{"username": "<username>", "password": "<password>"}'
2 - Get an access token
curl -v -H "Content-Type: application/json" -X POST <IP>:<PORT>/oauth/token -u <clientId>:<clientSecret> -d '{"username": "<username>", "password": "<password>", "grant_type": "password"}'
3 - Access a restricted resource using the access token
curl -X GET <IP>:<PORT>/restricted -v -H "Authorization: Bearer <accessToken>"
4 - Get a new access token using the refresh token
curl -X POST <IP>:<PORT>/oauth/token -u <clientId>:<clientSecret> -v -H "Content-Type: application/json" -d '{"grant_type": "refresh_token", "refresh_token": "<refreshToken>"}'
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].