본문 바로가기
카테고리 없음

[10/22] 저장소(storage)

by 그래놀라_ 2020. 10. 26.

storage (저장소)

HTML5 스팩에 추가된 개념

https://developer.mozilla.org/ko/docs/Web/API/Web_Storage_API

 

Web Storage API

Web Storage API는 브라우저에서 키/값 쌍을 쿠키보다 훨씬 직관적으로 저장할 수 있는 방법을 제공합니다.

developer.mozilla.org

 

 

*** 아까 오류 

sleepingtiger.tistory.com/76

There was an error fetching the SSO data. This is expected - and not a problem - if the tenant has Seamless SSO enabled. If the tenant doesn't have Seamless SSO enabled, this could simply mean that there was a problem with the network. But, if a "Origin" error has been logged before this warning, please add "http://localhost:8000" to the "Allowed Web Origins" list in the Auth0 dashboard: https://manage.auth0.com/#/applications/eSvyRiLgh8sjcbRtUKA9JrHjNiM7NFIH/settings

 

auth0 lock 를 통해 로그인(인증)에 성공했을 때 반환되는 값

→ accessToken을 localStorage에 저장

 

Network에 userinfo에서 Request URL로 접근하면 Unauthorized라고 나오는데

이는 토큰이 없기 때문이다. 아무나 정보를 주는게 아니라 토큰을 갖고있어야 접근이 가능하다

토큰

 

 

로그인한 사용자 정보를 조회할 때 localStorage에 저장된 access token을 authentication 요청 헤더를 통해서 전달

사용자 프로필 정보를 반환