Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

인가를 위해 사용하는 token #18

Open
1 of 4 tasks
seo-wo opened this issue Nov 23, 2023 · 1 comment · Fixed by #20, #28 or #51
Open
1 of 4 tasks

인가를 위해 사용하는 token #18

seo-wo opened this issue Nov 23, 2023 · 1 comment · Fixed by #20, #28 or #51
Assignees
Labels
enhancement New feature or request

Comments

@seo-wo
Copy link
Member

seo-wo commented Nov 23, 2023

기능 설명

jwt로 서명을 한 access_token과 refresh_token을 발행을 합니다.

현재 access_token을 프론트 url의 파라미터로 넘겨주고 있고 (프론트의 local storage에 간편히 저장하기 위해)
refresh_token은 쿠키로 전송하고 있습니다.

구현을 할 내용은 다음과 같습니다.

  • access_token이 유효하지만 인증이 만료된걸 확인하기.
  • access_token이 만료가 되었다면 다시 프론트에 refresh_token을 담아 요청을 보내게끔 하고, 해당 토큰을 확인하고 유효한지, 인증이 만료되지 않았는지 확인하기.
  • refresh_token이 만료가 되지 않았다면 새롭게 access_token을 발급하여 요청에 대한 응답과 함께 전달.
  • 만료가 되었다면 사용자를 로그아웃??

논의를 해볼 내용은 다음과 같습니다.

  • access_token과 refresh_token의 발급 시점( 현재 구글 oauth가 인증 되면 발급중)
  • access_token을 프론트 url의 파라미터가 아닌 방식을 전달 (쿠키?)
@seo-wo seo-wo added the enhancement New feature or request label Nov 23, 2023
@seo-wo
Copy link
Member Author

seo-wo commented Nov 24, 2023

구글 access_token을 이용하는 방식을 추가해봅니다.

다음과 같은 sequence_diagram을 따를 예정입니다.
login

seo-wo added a commit that referenced this issue Dec 1, 2023
for signup add google middleware to verify google access_token

#18
seo-wo added a commit that referenced this issue Dec 1, 2023
implement signup for new user

#18
seo-wo added a commit that referenced this issue Dec 1, 2023
for other modules, have to change entity name User to UserEntity

#18
seo-wo added a commit that referenced this issue Dec 1, 2023
seo-wo added a commit that referenced this issue Dec 1, 2023
from auth.controller to auth.service

#18
seo-wo added a commit that referenced this issue Dec 1, 2023
google AT and jwt RT use cookie, jwt AT will use localstorage

#18
@seo-wo seo-wo linked a pull request Dec 1, 2023 that will close this issue
seo-wo added a commit that referenced this issue Dec 1, 2023
seo-wo added a commit that referenced this issue Dec 1, 2023
@seo-wo seo-wo closed this as completed in #20 Dec 1, 2023
@seo-wo seo-wo reopened this Dec 5, 2023
seo-wo added a commit that referenced this issue Dec 5, 2023
add refresh token guard and strategy

#18
seo-wo added a commit that referenced this issue Dec 5, 2023
seo-wo added a commit that referenced this issue Dec 5, 2023
seo-wo added a commit that referenced this issue Dec 13, 2023
when signup, get image url as profile image

#18
seo-wo added a commit that referenced this issue Dec 13, 2023
manage refresh token in User table

#18
seo-wo added a commit that referenced this issue Dec 13, 2023
seo-wo added a commit that referenced this issue Dec 13, 2023
seo-wo added a commit that referenced this issue Dec 20, 2023
@Jiwon-Woo Jiwon-Woo assigned Jiwon-Woo and seo-wo and unassigned Jiwon-Woo Dec 30, 2023
This was linked to pull requests Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
2 participants