Code Monkey home page Code Monkey logo

express-signup-api's Introduction

타이틀

Express api 회원가입 서버 with mongoDB

  1. 의존 모듈 설치
  • package.json 참조
  • jsonwebtoken: 핵심 모듈, JSON Web Token 생성 검증 -jwt-secret
  • morgan : This module is used to print logs in terminal for each http request.
  1. 안드로이드 테스트 완료 버젼 21.10.09
  • todo POST /api/auth/register
  • todo POST /api/auth/login
  • todo GET /api/auth/check
  • todo GET /api/user/list
  1. 전체 업데이트 내용
  • crpto -> Bcrypt 적용

  • 다음 모델 적용 "basic-auth", "bcryptjs": , "nodemailer", "randomstring"

    basic-auth : This is used for login authentication. The email and password is sent by client as a Base64 encoded string in header which is decoded by this module. bcyptjs : Use to create and verify password hash using bcrpyt hasing algorithm. nodemailer : This module is used to sent mail using SMTP for forgot password process. randomstring : This module is used to generate random string which we use as a token for reset password.

userSchema name : String, email : String, hashed_password : String, created_at : String, temp_password : String, temp_password_time: String

  1. bcryptjs // bcryptjs 패스워드 생성 const salt = bcryptjs.genSaltSync(10); const hash = bcryptjs.hashSync(password, salt); // 패스워드 분석 , 맞으면 true 나옴 const encrypted = bcryptjs.compareSync(password, this.password)

  2. 패스워드 변경, 미들웨어(모간 : 기능5가지 [combined, tiny, dev, common]) 프로미스 학습 완료 프로미스 체이닝 학습 완료 : return new Promise((resolve,reject) => {}) 체인지 패스워드 작업 완료

  3. 패스워드 리셋, 분실 프로세스 추가 임시 패스워드 생성후, 이메일 전송 임시 패스워드 가지고 리셋후 새로운 비밀번호 저장, 추가 정리 필요...

express-signup-api's People

Contributors

rain2002kr avatar

Watchers

James Cloos avatar  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.