This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The fallback IP address to use if the real IP address cannot be determined. | |
*/ | |
const FALLBACK_IP_ADDRESS = '0.0.0.0'; | |
/** | |
* Returns the real IP address of the client. | |
* @param request - The incoming request. | |
* @param cfProxy - Whether the client is behind a Cloudflare proxy. | |
* @returns The real IP address of the client. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jwt | |
from jwt.algorithms import RSAAlgorithm | |
import requests | |
from time import time | |
import json | |
import os | |
APPLE_PUBLIC_KEY_URL = "https://appleid.apple.com/auth/keys" | |
APPLE_PUBLIC_KEY = None |