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_TOKEN
in GitHub repository secret -
Upload your MapKit Key to
MAPKIT_PRIVATE_KEY
in GitHub repository secret -
Replace my Cloudflare
CF_ACCOUNT_ID
with yours in.github/workflows/main.yml
-
Replace my Cloudflare
CF_ZONE_ID
with yours in.github/workflows/main.yml
-
Replace my MapKit JS
KEY_ID
with yours inwrangler.toml
-
Replace my Apple Developer
TEAM_ID
with yours inwrangler.toml
-
Replace my routes
ROUTES
with yours inwrangler.toml
-
Replace my domain
ORIGIN
with 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/