Skip to content

Commit

Permalink
Merge pull request #39 from urdego/feature/#12-login-apple
Browse files Browse the repository at this point in the history
๏ฟฝfix: ์• ํ”Œ ํ† ํฐ ์ƒ์„ฑ ์˜ค๋ฅ˜๋ฅผ ์ฐพ๊ธฐ ์œ„ํ•œ ๋””๋ฒ„๊น…
  • Loading branch information
aaahyesu authored Jan 3, 2025
2 parents a9adb13 + 2f4ef2d commit 918ee60
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SignJWT } from 'jose';
// ์• ํ”Œ ํ† ํฐ ์ƒ์„ฑ ํ•จ์ˆ˜
const getAppleToken = async () => {
const key = `-----BEGIN PRIVATE KEY-----\n${process.env.APPLE_PRIVATE_KEY}\n-----END PRIVATE KEY-----`;
const token = await new SignJWT({})
return await new SignJWT({})
.setAudience('https://appleid.apple.com')
.setIssuer(process.env.APPLE_TEAM_ID!)
.setIssuedAt(new Date().getTime() / 1000)
Expand All @@ -18,9 +18,6 @@ const getAppleToken = async () => {
kid: process.env.APPLE_KEY_ID,
})
.sign(createPrivateKey(key));

console.log('Generated Apple Client Secret:', token); // ํ† ํฐ ๋กœ๊ทธ ์ถœ๋ ฅ
return token;
};

// Apple ํ† ํฐ์„ ๋ฏธ๋ฆฌ ์ƒ์„ฑ
Expand Down

0 comments on commit 918ee60

Please sign in to comment.