feat: SSAFY OAuth 2.0 로그인 클라이언트 구현
All checks were successful
Client CI/CD / deploy (push) Successful in 34s

SSAFY 로그인 버튼 연동, 콜백 페이지 추가, AuthContext에 setUserFromSSAFY 메서드 추가.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 23:56:06 +09:00
parent 90e9922bde
commit c2e3be491d
5 changed files with 81 additions and 2 deletions

View File

@@ -18,6 +18,17 @@ export async function logout() {
return apiFetch('/api/auth/logout', { method: 'POST' });
}
export async function getSSAFYLoginURL() {
return apiFetch('/api/auth/ssafy/login');
}
export async function ssafyCallback(code) {
return apiFetch('/api/auth/ssafy/callback', {
method: 'POST',
body: JSON.stringify({ code }),
});
}
// 토큰을 리프레시하고 새 access token을 반환
export async function refreshToken() {
const rt = localStorage.getItem('refreshToken');