Skip to content

Commit

Permalink
Merge pull request #112 from sw326/main
Browse files Browse the repository at this point in the history
kakao
  • Loading branch information
sw326 authored Sep 11, 2024
2 parents cb09350 + b3989f8 commit 4ea1f23
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pages/members/Redirection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,17 @@ const Redirection: React.FC = () => {
throw new Error('Tokens are missing in the API response');
}

// 토큰 저장 및 로그인 처리
localStorage.setItem('token', accessToken);
localStorage.setItem('refreshToken', refreshToken);
login(accessToken, refreshToken, false);

console.log('Login successful:', { accessToken, refreshToken });

// 프로필 정보 가져오기
const profileResponse = await api.get('/members/profile');
console.log('Profile Response:', profileResponse.data);

navigate('/memberhome');
} catch (error) {
console.error('Login error:', error);
Expand Down

0 comments on commit 4ea1f23

Please sign in to comment.