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

[FEAT] Kakao OAuth Login 기능 추가 #80

Closed
12 tasks done
chhs2131 opened this issue Jan 16, 2023 · 4 comments · Fixed by #89
Closed
12 tasks done

[FEAT] Kakao OAuth Login 기능 추가 #80

chhs2131 opened this issue Jan 16, 2023 · 4 comments · Fixed by #89
Labels
enhancement New feature or request

Comments

@chhs2131
Copy link
Owner

chhs2131 commented Jan 16, 2023

목적

카카오 소셜(OAuth) 로그인 기능 추가


상세내용

package com.dbsgapi.dbsgapi.api.auth.dto;

import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class KakaoUserProfileDto {
    private long id;
    private boolean hasSignedUp;
    private LocalDateTime connectedAt;
    private LocalDateTime synchedAt;
    private String properties;
    private String kakaoAccount;
}

참고사항

카카오 사용자 정보 참고

{
  "id": 23847982347,
  "connected_at": "2021-12-22T07:20:28Z",
  "for_partner": {
    "uuid": "VmdfuudthIsdTs123kj123k13n12QY1pvDw"
  },
  "properties": {
    "nickname": "먼그",
    "profile_image": "-----.jpg",
    "thumbnail_image": "-----.jpg"
  },
  "kakao_account": {
    "profile_needs_agreement": false,
    "profile": {
      "nickname": "먼그",
      "thumbnail_image_url": "-----.jpg",
      "profile_image_url": "-----.jpg",
      "is_default_image": false
    },
    "has_email": true,
    "email_needs_agreement": false,
    "is_email_valid": true,
    "is_email_verified": true,
    "email": "[email protected]",
    "has_age_range": true,
    "age_range_needs_agreement": false,
    "age_range": "20~29",
    "has_birthday": true,
    "birthday_needs_agreement": false,
    "birthday": "0101",
    "birthday_type": "SOLAR",
    "has_gender": true,
    "gender_needs_agreement": false,
    "gender": "male"
  }
}
curl -X GET "https://kapi.kakao.com/v2/user/me?secure_resource=false" \
	-H "Authorization: Bearer WH61NBQhdSmU4gWnpC5DpJ_ESNcZo57H0XQzgac2CinI2gAAAYYDck7C"

@chhs2131 chhs2131 added the enhancement New feature or request label Jan 16, 2023
@chhs2131
Copy link
Owner Author

카카오 토큰을 통해 로그인 동작 테스트 완료
image

@chhs2131
Copy link
Owner Author

doFilter를 통해 JWT 정보를 SecurityContextHolder에 저장 확인
image

chhs2131 added a commit that referenced this issue Feb 27, 2023
Feature/#80 - JWT 인증 구현 및 카카오 로그인 구현 SNAPSHOT (v0.5.2)
@chhs2131
Copy link
Owner Author

카카오 서버에서 발생시키는 Error에 대해 인터셉트
image

chhs2131 added a commit that referenced this issue Mar 29, 2023
chhs2131 added a commit that referenced this issue Mar 29, 2023
Feature/#80 - Kakao OAuth Login 기능 추가
@chhs2131 chhs2131 mentioned this issue Mar 29, 2023
@chhs2131
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant