boostcamp-2020/IssueTracker-35

[store] User

Closed this issue · 0 comments

joh16 commented

개요

  • 사용자의 상태를 관리하는 Store

초기 상태

  • token : localStorage.getItem('token')
  • user : undefined

Actions

  • LOGIN
    • GitHub 로그인 시 발생
    • 토큰 값이 존재하나 user가 없고 토큰으로 사용자 조회에 성공하면 발생
    • token, user 갱신
  • LOGOUT
    • 유저가 로그아웃할 때 발생
    • token과 user를 undefined로 설정