- install dependency
yarn
- start server
yarn start
- start dev server
yarn serve
- express: http web server
- cookie-parser: parse http cookie
- csurf: handle CSRF attack
- cors: handle CORS
- firebase: database, auth
- firebase-admin: admin SDK to manage user
- dotenv: manage env config
- admin.js: initialize firebase admin app
- config.js: manage environment variables
- firebase.js: initialize firebase app
- index.js: start express web app
- userInfo.js: handle user's information data
- create user info
- update user info
- get user info
- return cache data if don't update info: use LRU cache
- create item info
- update item info
- get item info
- sign up
- verify email
- issue: hide link's api key
- verify email
- check logged when using api
- add login checker to middleware
- manage cookie
- add csrf
- refresh expiration token
- Session
- Login
- After cookie expires, actions?
- Its check speed is too late... (about 1sec)
- Logout
- Login
- login
- logout
- https://firebase.google.com/docs/auth/admin/verify-id-tokens?authuser=0
- https://firebase.google.com/docs/auth/admin/manage-sessions?authuser=0
- https://firebase.google.com/docs/auth/admin/manage-cookies?authuser=0#sign_in
- https://www.youtube.com/watch?v=N5U7KtxvVto
- Backend
- Frontend
- Login Web page
- Session Login
- Session Logout
- Get user information
- Login Form
- cookie
- sameSite
- CORS
- CSRF
- credential
- set-cookie
- cross-site