Skip to content

Commit 5db172d

Browse files
authored
Merge pull request #402 from Quickchive/fix/apple-login
fix: 애플 로그인 code 해석 작업
2 parents 38befc8 + bf8c8eb commit 5db172d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/auth/oauth.v2.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ export class OAuthV2Service {
150150
return this.oauthLogin(newUser.email, PROVIDER.GOOGLE);
151151
}
152152

153-
public async appleLogin({ authorizationToken }: OAuthLoginRequest) {
154-
const { sub: id, email } = this.jwtService.decode(authorizationToken);
153+
public async appleLogin({ authorizationToken: code }: OAuthLoginRequest) {
154+
const data = await this.oauthUtil.getAppleToken(code);
155+
const { sub: id, email } = this.jwtService.decode(data.id_token);
155156

156157
const user = await this.userRepository.findOneByEmailAndProvider(
157158
email,

0 commit comments

Comments
 (0)