Skip to content

Commit

Permalink
feat: 카카오 API 연결 후 nickname 및 email 추출
Browse files Browse the repository at this point in the history
  • Loading branch information
sinji2102 committed Jul 11, 2024
1 parent 2e23ce6 commit 5214ba5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/kakaoLogin/KakaoLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ const KakaoLogin = () => {
const userData = await getData(token);

// 이 부분 이메일 + 닉네임 + 인가코드까지 서버에 POST
// 현재는 임시로 console 찍어뒀는데, API POST 붙이기

const nickname = userData.properties.nickname;
const email = userData.kakao_account.email;

console.log(userData);
console.log(`Nickname: ${nickname}, Email: ${email}`);
} catch (error) {
console.error(error);
}
Expand Down

0 comments on commit 5214ba5

Please sign in to comment.