try new generated appleID secret
This commit is contained in:
@ -9,17 +9,19 @@ export default async function handler(req, res) {
|
||||
if (req.method === 'GET') {
|
||||
try {
|
||||
const appleKey = fs.readFileSync(path.resolve('./_deploy/appleKey.p8'), 'utf8');
|
||||
|
||||
const teamID = process.env.APPLE_TEAM_ID || "XC57P9SXDK";
|
||||
const keyID = process.env.APPLE_KEY_ID || "TB3V355G5Y";
|
||||
const appleAppID = process.env.APPLE_APP_ID || "com.mwitnessing.mwitnessing";
|
||||
const token = jwt.sign({}, appleKey, {
|
||||
algorithm: 'ES256',
|
||||
expiresIn: '180d',
|
||||
issuer: process.env.APPLE_TEAM_ID,
|
||||
issuer: teamID,
|
||||
header: {
|
||||
alg: 'ES256',
|
||||
kid: process.env.APPLE_KEY_ID,
|
||||
kid: keyID,
|
||||
},
|
||||
audience: 'https://appleid.apple.com',
|
||||
subject: process.env.APPLE_ID,
|
||||
subject: appleAppID,
|
||||
});
|
||||
|
||||
// Redirect to Apple's authentication page, or send the token to the client to do so
|
||||
|
Reference in New Issue
Block a user