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.
- 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
git clone https://github.com/Sudheer121/Full-Auth.git
npm install
node dbrunonce.js (sets up SQLite database)
Change filename .env.example to .env
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.
/
/login
/register
/api/gsignin
/api/fbsignin
/api/pay
The website uses a Cookie called 'grishmat'.
Learn about JWT here
Learn about integrating Google Signin here
Learn about integrating Facebook Signin here