Skip to content
Simple oauth app in Node.js (pure object-oriented approach).
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.eslintrc.json
.gitignore
LICENSE
README.md
build.js
login.png
package-lock.json
package.json
profile.png

README.md

simple-oauth-app

Simple oauth app in Node.js. It's completely based on Async Tree Pattern. The main point of this app is to show that it's possible to create oauth app in the declarative way.

Stack of technologies

Node.js, MongoDB, @cuties, JWT (basic implementation, without external libraries).

Why this example is cool

  1. It's based on @cuties, so you can write your asynchronous code in the declarative way (without callbacks, Promises, and async/await abstractions).
  2. You can see how authentication can be implemented with only simple external https requests.
  3. You can see how JWT works (this app doesn't use third party libraries for using JWT).

Installation

First of all you need to install MongoDB on your machine.

Then type following commands:

git clone git@github.com:Guseyn/simple-oauth-app.git
cd simple-oauth-app
npm install

Build app

npm run build

Run app

npm run start

You can open it on http://localhost:8000/

Model

User: {
  _id,
  name,
  email,
  password,
  description,
  signupDate
}

OAuth types

  1. Basic: email and password
  2. Google OAuth
  3. GitHub OAuth

All these types are synchronized, so you can everytime choose different way to sign in your profile.

Screenshots

Demo

IMAGE ALT TEXT HERE

You can’t perform that action at this time.