local strategy perment token
1y
passport
찾아보니 feathers 내부적으로 passport 사용하다가 독자노선으로 가는 듯 하다
Authentication next · Issue #1045 · feathersjs/feathers
Dismiss GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up This was referenced Feb 7, 2019 daffl added a commit that referenced this issue Feb 10, 2019 BEAKING CHANGE: Express and passport independent rewrite of authentication core server.
https://github.com/feathersjs/feathers/issues/1045
어쨌든 내부적인 부분이고 passport 가 해주는 걸 feathers가 자동으로 해주는 거
결국에 우리는 어떻게 accessToken 을 저장하냐 문제인데
passport 는 일반적으로 session 에 저장하는 걸로 보인데 근데 localstorage 에 하는 예제도 있음 최신기술이라 별로 없는듯
blog.md
들어가기 전에 본 포스트는 Typescript/Express/Passport 를 이용해서 Jwt 기반 회원인증 시스템을 구축하는 방법을 설명합니다. Jwt 나 Typescript 가 익숙하지 않다면 조금 어려울 수 있습니다. 최대한 한 줄 한 줄 상세하게 설명하도록 하겠습니다. 저는 패키지 매니저로 npm, 코드 에디터로는 vscode 를 사용하고 있습니다. 개인적으로 typescript 관련 지원이 가장 깔끔해서 vscode 를 적극 추천합니다.
https://gist.github.com/leejh3224/13a5b5e8ae615947a0e90e1907a76ba7

- 다 세션 예제
(NodeJS) Passport로 회원가입 및 로그인하기
안녕하세요. 이번 시간에는 Passport.js 패키지를 사용해 회원가입과 로그인을 구현하겠습니다! 이 강좌는 ReactJS 리덕스 강좌 와도 이어집니다. npm install passport passport-local express-session 일단 두 패키지를 설치합니다. passport는 한글로 여권입니다. 이름처럼 자신의 웹사이트에 방문할 때 여권같은 역할을 합니다. 로그인을 쉽게 할 수 있게 도와줍니다. 이름 잘 지었죠? passport-local은 로그인을 직접 구현할 때 사용됩니다.
https://www.zerocho.com/category/NodeJS/post/57b7101ecfbef617003bf457
NodeJS Passport(인증 미들웨어)
인증(authentication)에 대해 궁금하다면 여기 로 들어가면 된다 passport 란? passport 는 인증 절차를 로직을 편하게 작업할 수 있게 도와주는 Node.js 미들웨어이다 Document : http://www.passportjs.org/docs/downloads/html/ 제일 먼저 passport의 strategy 를 알아야한다 strategy 란 passport 에서 쓰는 인증 방식 을 말한다. 예로 passport-local, passport-github, passport-jwt 등이 있다. strategies 그중에서 passport-local 방식을 사용해 보자.
https://velog.io/@ground4ekd/nodejs-passport

Passport.js - 생활코딩
이 수업은 Node.js Express의 인증 미들웨어인 Passport.js의 사용법을 알려드리는 수업입니다. 로그인/로그아웃/접근제한과 같은 인증 기능을 구현하고 싶은 분에게 필요한 수업입니다. 또 페이스북, 구글, 네이버, 카카오와 같은 기업의 사용자 정보를 이용해서 사용자에게 인증 기능을 이용할 수 있게 하는데도 필요한 기반 기술입니다. Youtube 재생목록으로 바로가기 Express와 Cookie를 전혀 모르신다면 아래 수업들을 먼저 보시고 이 수업에 참여할 것을 권해드립니다.
https://opentutorials.org/course/3402

나는 session cookie 하나도 안써보고 최신기술만 쓰네
너무좋군
그리고 토큰 종류로
- accessToken - api 호출용
- refreshToken - accessToken 기간늘리기
인데 feathers는 accesstoken 지원만 해서 refreshToken 없냐 한다
Add support for refresh tokens · Issue #1337 · feathersjs/feathers
Dismiss GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up daffl transferred this issue from feathersjs-ecosystem/authentication May 8, 2019 You can't perform that action at this time. You signed in with another tab or window.
https://github.com/feathersjs/feathers/issues/1337
아래쪽에 after hook으로 구현한건지 뭐가 있는데 그럴 필요 없을 것 같고 오버헤드고
Overriding JWT's expiresIn with a value more than 20d prevents users from signing in · Issue #458 · feathersjs-ecosystem/authentication
UPDATE: I forked this and tried running the tests locally, inspecting the tokens generated, and they seem to have a correct exp value. What gives? I am trying to make a token expire a little longer than the default '1d', however, when I ...
https://github.com/feathersjs-ecosystem/authentication/issues/458
원래 20일 제한 있는거 업데이트 됐다는? 말인가 쨌든 refresh 구현을 필요없을 듯 하고
config/default.json그냥 1년으로 때려박았다
localstorage 보안
- 뭐 nuxt web storage library이것저것 있어서 id pass보안저장 해보려 했더니
기본적으로 보안이 좋지 않다고 해서 idpw 평문저장 아니라도 access token 만 저장하자
나중에 라이브러리 암호화 부분 이해되면 expire exception 에 idpw 불러와서 refresh 시켜주면 될듯
- watch vuex by computed and watch
store.watch in Vuex :: 마이구미
vuex를 이용할 때 watch 구현 방법을 알아본 후, watch가 작동이 안되는 경우도 원인을 파악할 수 있는 방법을 알아본다. 기본적으로 watch는 상태의 동적 변화를 감지하기 위해 사용한다. 일반적으로 Vue.js는 watch 또는 computed를 활용한다. 크게 2가지로 방법으로 볼 수 있다.
https://mygumi.tistory.com/182

→ simultanious logout
오졌다..
쨌든 이제 끝났고
insert created by
insert images
Interpolation inside attributes has been removed 에러 떠서 보니이렇게 된다
Vue.js img src 데이터 값 넣기
https://blog.j2p.io/vue-js-img-src-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EA%B0%92-%EB%84%A3%EA%B8%B0


요상하게 떠서 수정 해줘야함

왼쪽 몰려서 부모 text align 주 고

Seonglae Cho