Git Product home page Git Product logo

-node-authentication-module's Introduction

Chức năng

  • Đăng kí: Người dùng đăng kí tài khoản sử dụng gmail định dạng [email protected] -> Hệ thông sẽ gửi link kích hoạt tài khoản về gmail. Người dùng kiểm tra email và kích hoạt tài khoản( Sau 5 phút nếu tài khoản không được kích hoạt sẽ bị xoá khỏi dữ liệu).
  • Đăng nhập: Người dùng sử dụng tài khoản đã được đăng kí để đăng nhập → Nhận về AccessToken và RefrehToken.
  • Kích hoạt tài khoản qua gmail
  • Sử dụng cơ chế AccessToken và Refresh Token để xử lý phiên đăng nhập

Cài đặt:

  1. Cài đặt MongoDB
  2. Cài đặt Redis

Khởi chạy dự án

  • Clone project
git clone https://github.com/ducgiangtrankma/-Node-Authentication-Module.git
  • Cấu hình file .env theo yêu cầu
DB_CONNECTION = "xxxx"
DB_HOST = "xxx"
DB_PORT = xxx
DB_NAME = "xxx"
APP_PORT = xxx
APP_HOST = "xxx"
ACCESS_TOKEN_KEY = "xxxx"
REFRESH_TOKEN_KEY = "xxxx"
ACCESS_TOKEN_EXPIRES = "xxx"
REFRESH_TOKEN_EXPIRES = "xxx"
GOOGLE_MAILER_CLIENT_ID = "xxxx"
GOOGLE_MAILER_CLIENT_SECRET = "xxxx"
GOOGLE_MAILER_REFRESH_TOKEN = "xxxxx"
ADMIN_EMAIL_ADDRESS = "xxxx"
EXPIRES_TIME_ACTIVE_ACCOUNT = xxx
  • Khởi chạy service local
brew services start mongodb-community
brew services start redis
redis-cli config set notify-keyspace-events Ex
redis-cli psubscribe __keyevent@0__:expired
  • Khởi chạy server
npm start

-node-authentication-module's People

Contributors

ducgiangtrankma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.