fix apple jwt expiry check

This commit is contained in:
Gildas Garcia committed 2026-04-14 10:45:28 +02:00
1 parent ed1fdb203d
commit 75ee97eb7d
1 file changed
+1 -1
@@ -614,7 +614,7 @@ const EXTERNAL_PROVIDER_APPLE = {
try {
const parts = value.split('.').map((value) => parseBase64URL(value))
const body = JSON.parse(parts[1])
return Date.now() < body.exp - 7 * 24 * 60 * 60 * 1000
return Date.now() < body.exp * 1000 - 7 * 24 * 60 * 60 * 1000
} catch (e: any) {
console.log(e)
return false