Skip to content

Conversation

@10tacion
Copy link
Member

@10tacion 10tacion commented May 3, 2025

🔥 Related Issues

  • close #issue_number

✅ 작업 리스트

  • redirect 페이지 일렉트론 환경일 때 hash 값 처리

🔧 작업 내용

🧐 새로 알게된 점

🤔 궁금한 점

📸 스크린샷 / GIF / Link

@10tacion 10tacion self-assigned this May 3, 2025
@10tacion 10tacion requested a review from Copilot May 3, 2025 07:59
@10tacion 10tacion merged commit 17094fb into develop May 3, 2025
1 check passed
@10tacion 10tacion deleted the refactor/#308/token branch May 3, 2025 08:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds refresh token handling for the redirect page in an Electron environment and updates authentication utilities accordingly.

  • Added getRefreshToken and setRefreshToken functions in auth.ts.
  • Modified the RedirectPage to handle refreshToken extraction and storage.
  • Introduced a comment in the API client regarding future usage of the localStorage refresh token.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/shared/utils/auth.ts Added functions for retrieving and setting the refresh token.
src/shared/apisV2/client.ts Added a comment regarding future improvements to refresh token usage.
src/pages/RedirectPage/RedirectPage.tsx Updated token extraction logic to support Electron-specific hash parsing.

Comment on lines +43 to 44
// NOTE: 추후에 로컬스토리지에 저장된 refreshToken을 사용하게끔 고치는 것이 필요할수있음
const { data } = await postReissueToken();
Copy link

Copilot AI May 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implement usage of the localStorage refreshToken (using getRefreshToken) in the token reissue logic to improve consistency with the authentication flow.

Suggested change
// NOTE: 추후에 로컬스토리지에 저장된 refreshToken을 사용하게끔 고치는 것이 필요할수있음
const { data } = await postReissueToken();
// Use the refresh token from localStorage for token reissue
const refreshToken = getRefreshToken();
const { data } = await postReissueToken(refreshToken);

Copilot uses AI. Check for mistakes.

useEffect(() => {
const params = new URLSearchParams(search);
// @ts-expect-error
Copy link

Copilot AI May 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding proper type definitions for window.electron to handle the Electron-specific branch instead of using @ts-expect-error.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants