Skip to content

Latest commit

 

History

History
85 lines (51 loc) · 2.42 KB

readme.md

File metadata and controls

85 lines (51 loc) · 2.42 KB

About

This is an auth module built with nodejs.The code is modularized and will be helpful for anyone looking into exploring the below mentioned technologies, learning OAuth2 or MVC architecture in nodejs.
Have a look at https://full-auth.herokuapp.com.

Tech Stack / Tools

Nodejs

jQuery Ejs Express

SQLite MySQL

Features

  • Authentication and authorization using JWT tokens.
  • Google and Facebook Sign In.
  • Uses server side cookies
  • Saves data in SQLite database
  • Model - View - Controller Architecture
  • Responsive

To setup locally


git clone https://github.com/Sudheer121/Full-Auth.git
npm install 
node dbrunonce.js (sets up SQLite database)
  

Change filename .env.example to .env


More Details

Database Tables

registration(uid, email, first_name, last_name, phone_no, signin_type)

transactions(uid, pname, pid, pprice, tdate, ttime)

uid => user id, pname => product name

MySQL database can also be used instead of SQLite, nodejs mysql queries are commented below SQLite queries.

Api Routes

/ 
/login
/register
/api/gsignin
/api/fbsignin
/api/pay

Cookies

The website uses a Cookie called 'grishmat'.


Helpful resources for learners

Learn about JWT here

Learn about integrating Google Signin here

Learn about integrating Facebook Signin here

Issues and PRs are welcome