HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📝
학습 TIL
/
🌱
[TIL] 데브코스 96일차
🌱

[TIL] 데브코스 96일차

Date
Aug 1, 2022
대주제
TIL
프로젝트
주제
인증
인가
활동 기록

오늘 배운 것 🌱

  • 인증/인가 에 대한 공부
    • ✅ 인증과 인가의 차이
      ✅ 토큰의 저장 방식 방법들
      ✅ RG 인증/인가 로드맵 작성
 
  • 이슈
    • ts 파일 아닌데, env파일 검사되는 부분, react-router a 태그 처리

느낀점 😎

  • 오늘 기본적인 말도 안되는 실수들로 많은 시간을 허비했다.
    • env파일에서 const 사용으로 인한 error
    • Oauth 설정 중 redirectURL을 로그인 페이지로 지정하여, 인가코드를 받지 못한 부분

참고

  • authRoute를 통한 권한 처리
    • React-Router를 통한 인증절차 by DaleSeo (link) - authRoute
    • React-Router를 통한 권한 설정 by 김정환 (link) - authRoute
  • 토큰의 저장 방식
    • React-axios 토큰 인증/갱신 처리 방법 by J0DEV (link)
    • JWT로 로그인 인증 1. 쿠키에 저장하기 by r4bb1t (link)
    • Is it safe to store a JWT in localStorage with ReactJS?
      In most of the modern single page applications, we indeed have to store the token somewhere on the client side (most common use case - to keep the user logged in after a page refresh). There are a total of 2 options available: Web Storage (session storage, local storage) and a client side cookie.
      Is it safe to store a JWT in localStorage with ReactJS?
      https://newbedev.com/is-it-safe-to-store-a-jwt-in-localstorage-with-reactjs