Skip to content

Commit

Permalink
Merge pull request #145 from inje-megabrain/modi/kakaologin
Browse files Browse the repository at this point in the history
Modi/kakaologin
  • Loading branch information
mjh000526 authored Mar 21, 2024
2 parents 8d6e1e5 + bd8cbe8 commit 2a2a125
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 50 deletions.
53 changes: 5 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
HELP.md
<<<<<<< HEAD
.gradl

=======
<<<<<<< HEAD
.gradl

=======
.gradle
>>>>>>> 0ba3d96e28582a106923c0002d0de00d86636cc6
>>>>>>> 8601bc98eebe8c6d385e6609da4ad3cfa1aa969f

build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
Expand All @@ -19,30 +13,14 @@ build/
/src/test/resources/application.yml
/src/main/resources/templates/secret/.p8

=======
<<<<<<< HEAD
<<<<<<<< HEAD:.gitignore

/src/test/resources/application.yml
<<<<<<< HEAD
<<<<<<< HEAD
/src/main/resources/templates/secret/AuthKey_2Y9664DW2T.p8
=======
/src/main/resources/templates/secret/.p8
>>>>>>> aea347125278b8318ff91f76045a9a2d7fb0c828
=======
/application.yml
<<<<<<< HEAD
>>>>>>> 5855445d7bc8ef3f27e9adfe6798588403df3aac

=======
/application.yml
/src/main/resources/templates/secret/.p8
>>>>>>> aea347125278b8318ff91f76045a9a2d7fb0c828

========
>>>>>>>> 0ba3d96e28582a106923c0002d0de00d86636cc6:just/.gitignore
=======
>>>>>>> 0ba3d96e28582a106923c0002d0de00d86636cc6
>>>>>>> 8601bc98eebe8c6d385e6609da4ad3cfa1aa969f
/src/main/resources/key/just-firebase-key.json
### STS ###
.apt_generated
.classpath
Expand All @@ -51,14 +29,7 @@ build/
.settings
.springBeans
.sts4-cache
<<<<<<< HEAD

=======
<<<<<<< HEAD

=======
>>>>>>> 0ba3d96e28582a106923c0002d0de00d86636cc6
>>>>>>> 8601bc98eebe8c6d385e6609da4ad3cfa1aa969f
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
Expand All @@ -68,14 +39,7 @@ bin/
*.iws
*.iml
*.ipr
<<<<<<< HEAD

=======
<<<<<<< HEAD

=======
>>>>>>> 0ba3d96e28582a106923c0002d0de00d86636cc6
>>>>>>> 8601bc98eebe8c6d385e6609da4ad3cfa1aa969f
out/
!**/src/main/**/out/
!**/src/test/**/out/
Expand All @@ -88,12 +52,5 @@ out/
/.nb-gradle/

### VS Code ###
<<<<<<< HEAD
.vscode/
=======
<<<<<<< HEAD
.vscode/
=======

.vscode/
>>>>>>> 0ba3d96e28582a106923c0002d0de00d86636cc6
>>>>>>> 8601bc98eebe8c6d385e6609da4ad3cfa1aa969f
4 changes: 2 additions & 2 deletions src/main/java/com/example/just/Service/KakaoService.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ResponseEntity loginKakao(String token) throws IOException{
try{
//카카오토큰으로
MemberDto user = getKakaoUser(token);
userbyEmail = userRepository.findByEmail(user.getEmail());
userbyEmail = userRepository.findByEmail(user.getProvider_id()+"@kakao.com");
//DB에 없는 사용자라면 회원가입 처리
if(userbyEmail == null){
return new ResponseEntity<>("/api/kakao/signup", HttpStatus.OK);
Expand Down Expand Up @@ -87,7 +87,7 @@ public ResponseEntity signUpKakao(String token, String nickname){
//DB에 없는 사용자라면 회원가입 처리
if(userbyEmail == null){
userbyEmail = Member.builder()
.email(user.getEmail())
.email(user.getProvider_id()+"@kakao.com")
.provider(user.getProvider())
.provider_id(user.getProvider_id())
.authority(Role.ROLE_USER)
Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/key/just-firebase-key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "service_account",
"project_id": "just-9d9d3",
"private_key_id": "952d0338444d9cedf930af46a4a08d77401f5b44",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQChMUc6RlSSvczb\nU1PPbgWTmxTbn42wp/frZVa5l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jUWhSiVHqTZovXSR6Nhy8k/iCylb\nmqVxi33Kno2ns56VZ9ZDHhk7IRN1mQMNHl2q3xzk6lSOB9BLHM07iSV+6hXNgh1O\nAqWu5GjL7LLDYzbMEF0lBtQZgz/Zm9RRJUZkhZZzV05O2kTA85flDREhAoGAFGYf\nL8BPEznP+HVp/jSh1GtTgMyKXcOqO+B8rDqQq5Uh34BBIq1at//Z4aJZpK6gKTjn\nzFyUZ8iOVkLFPAai5w+0bAacP/J0crpnajpYiO0zkTZ2PB0aw3hopbZFdIBczQqe\n6MGnhHgilGdFf4Nc3vj5tmPO+kJDwlCAQCg5lgkCgYBbMcIVYzxfo5WyMzE+CfUr\n28j1k8g4ju1HZoPyHKpIE5YpLCKX0RJws2oHVg5Q0czxuJibwXzPGFNd5mLlBcl5\np4V9enVDQrxkxd4METZH+/6QxKC53APwuE5ENbyBWdn3HSd9Of/sSrs4A1Nr4adq\nqvNsaaDQfAxhqzIQt9rklw==\n-----END PRIVATE KEY-----\n",
"client_email": "firebase-adminsdk-vmv99@just-9d9d3.iam.gserviceaccount.com",
"client_id": "102666728200251056052",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-vmv99%40just-9d9d3.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}

0 comments on commit 2a2a125

Please sign in to comment.