Skip to content

Commit da84251

Browse files
authored
[DPMBE-118]이메일 허용 안했을때 발생하는 문제 해결
2 parents 40bcc23 + 79b1246 commit da84251

File tree

7 files changed

+2
-8
lines changed

7 files changed

+2
-8
lines changed

Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/dto/response/OauthUserInfoResponse.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ package com.depromeet.whatnow.api.auth.dto.response
33
import com.depromeet.whatnow.api.auth.helper.OauthUserInfoDto
44

55
data class OauthUserInfoResponse(
6-
val email: String?,
76
val profileImage: String,
87
val isDefaultImage: Boolean,
98
val nickname: String,
109
) {
1110

1211
companion object {
1312
fun from(oauthUserInfoDto: OauthUserInfoDto): OauthUserInfoResponse {
14-
return OauthUserInfoResponse(oauthUserInfoDto.email, oauthUserInfoDto.profileImage, oauthUserInfoDto.isDefaultImage, oauthUserInfoDto.username)
13+
return OauthUserInfoResponse(oauthUserInfoDto.profileImage, oauthUserInfoDto.isDefaultImage, oauthUserInfoDto.username)
1514
}
1615
}
1716
}

Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/KakaoOauthHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class KakaoOauthHelper(
4141
fun getUserInfo(oauthAccessToken: String): OauthUserInfoDto {
4242
val response = kakaoInfoClient.kakaoUserInfo(BEARER + oauthAccessToken)
4343
val kakaoAccount: KakaoInformationResponse.KakaoAccount = response.kakaoAccount
44-
return OauthUserInfoDto(response.id, kakaoAccount.profile.profileImageUrl, kakaoAccount.profile.isDefaultImage, kakaoAccount.profile.nickname, kakaoAccount.email, OauthProvider.KAKAO)
44+
return OauthUserInfoDto(response.id, kakaoAccount.profile.profileImageUrl, kakaoAccount.profile.isDefaultImage, kakaoAccount.profile.nickname, OauthProvider.KAKAO)
4545
}
4646

4747
fun getOIDCDecodePayload(token: String): OIDCDecodePayload {

Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/OauthUserInfoDto.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ data class OauthUserInfoDto(
88
val profileImage: String,
99
val isDefaultImage: Boolean,
1010
val username: String,
11-
val email: String?,
1211
val oauthProvider: OauthProvider,
1312
) {
1413
fun toOauthInfo(): OauthInfo {

Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/JwtOIDCHelper.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class JwtOIDCHelper {
5252
body.issuer,
5353
body.audience,
5454
body.subject,
55-
body["email", String::class.java],
5655
)
5756
}
5857

Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/OIDCDecodePayload.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ data class OIDCDecodePayload(
1111
/** oauth provider account unique id */
1212
val sub: String,
1313

14-
val email: String,
1514
)

Whatnow-Infrastructure/src/main/kotlin/com/depromeet/whatnow/api/dto/KakaoInformationResponse.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ data class KakaoInformationResponse(
1818
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy::class)
1919
data class KakaoAccount(
2020
val profile: Profile,
21-
val email: String?,
2221
) {
2322

2423
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy::class)

Whatnow-Infrastructure/src/test/kotlin/com/depromeet/whatnow/api/KakaoInfoClientTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class KakaoInfoClientTest {
4040
),
4141
)
4242
var response = kakaoInfoClient.kakaoUserInfo("accessToken")
43-
assertEquals(response.kakaoAccount.email, "sample@sample.com")
4443
assertEquals(response.kakaoAccount.profile.profileImageUrl, "http://yyy.kakao.com/dn/.../img_640x640.jpg")
4544
assertEquals(response.kakaoAccount.profile.isDefaultImage, false)
4645
}

0 commit comments

Comments
 (0)