Cloudflare Workers that generate JWT for MapKit JS.
It contains two routes:
/services/jwt, an API endpoint that returns JWT for MapKit JS./, a simple Apple Maps application, demostrating how to use the API above.
This repository use GitHub Actions to deploy the service to Cloudflare Workers
-
Upload your Cloudflare API token to
CF_API_TOKENin GitHub repository secret -
Upload your MapKit Key to
MAPKIT_PRIVATE_KEYin GitHub repository secret -
Replace my Cloudflare
CF_ACCOUNT_IDwith yours in.github/workflows/main.yml -
Replace my Cloudflare
CF_ZONE_IDwith yours in.github/workflows/main.yml -
Replace my MapKit JS
KEY_IDwith yours inwrangler.toml -
Replace my Apple Developer
TEAM_IDwith yours inwrangler.toml -
Replace my routes
ROUTESwith yours inwrangler.toml -
Replace my domain
ORIGINwith yours inwrangler.toml
Once you commit the changes to GitHub, GitHub Actions should be triggered and deploy the services to Cloudflare Workers
- https://github.com/marketplace/actions/deploy-to-cloudflare-workers-with-wrangler
- https://developers.cloudflare.com/workers/cli-wrangler/configuration
- https://developer.apple.com/maps/web/
- https://developer.apple.com/documentation/mapkitjs/creating_and_using_tokens_with_mapkit_js
- https://jwt.io/