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

[FE] auth 요청 4번 보내는 현상 해결 #753

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

jinhokim98
Copy link
Contributor

issue

구현 사항

useAdminPage와 AuthGate 두 곳에서 중복적으로 부르는 postAuthenticate 제거

AuthGate에서 postAuthenticate 함수를 불러 auth 상태를 업데이트하는데 그 하위 useAdminPage에서 중복적으로 postAuthenticate를 부르고 있었습니다.

그래서 useAdminPage에서 postAuthenticate 함수 호출 구문을 제거했습니다.

개선 후 호출 결과

image

🫡 참고사항

@jinhokim98 jinhokim98 added 🖥️ FE Frontend 🔍 QC quality check Medium labels Oct 16, 2024
@jinhokim98 jinhokim98 added this to the v2.1.1 milestone Oct 16, 2024
@jinhokim98 jinhokim98 self-assigned this Oct 16, 2024
@jinhokim98 jinhokim98 linked an issue Oct 16, 2024 that may be closed by this pull request
Copy link

Copy link
Contributor

@Todari Todari left a comment

Choose a reason for hiding this comment

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

어느새부턴가 디버깅 할 때 네트워크 탭에서 auth가 네번 날아가는것을 확인해버린... ㅋㅋㅋㅋㅋㅋ
생각보다 쿠키가 원인을 쉽게 찾고 쉽게 해결한 것 같아서 대단합니다.
불필요한 요청 줄이기~~~~

approve 할게용 고생 많았습니다

Copy link
Contributor

@soi-ha soi-ha left a comment

Choose a reason for hiding this comment

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

어쩐지... 여러번 찍히더라니.. 이렇게 간단하게 해결해줘서 고마워요 쿠키!

Copy link
Contributor

@pakxe pakxe left a comment

Choose a reason for hiding this comment

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

AuthGate를 잘 만들어 두어서 한 곳에서 책임을 가두니 굉장히 좋은 것 같아요!

@Todari Todari merged commit 926af89 into fe-dev Oct 17, 2024
2 checks passed
@Todari Todari deleted the feature/#752 branch October 17, 2024 06:25
@Todari Todari mentioned this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥️ FE Frontend Medium 🔍 QC quality check
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[FE] auth 요청 4번 보내는 현상 해결
4 participants