Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darrylbayliss/mapkit-jwt-generator
A simple script to generate jwt's for mapkitjs
https://github.com/darrylbayliss/mapkit-jwt-generator
javascript mapkit-js nodejs
Last synced: about 14 hours ago
JSON representation
A simple script to generate jwt's for mapkitjs
- Host: GitHub
- URL: https://github.com/darrylbayliss/mapkit-jwt-generator
- Owner: DarrylBayliss
- Created: 2021-04-26T16:04:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-19T21:02:31.000Z (over 1 year ago)
- Last Synced: 2024-04-17T01:03:37.164Z (7 months ago)
- Topics: javascript, mapkit-js, nodejs
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MapkitJS Jwt Generator
Use this script to generate a JWT for MapkitJS.
Written using node.js.
# Usage
1. Create a Maps ID and private key as described [here](https://developer.apple.com/documentation/mapkitjs/creating_a_maps_identifier_and_a_private_key). Make sure to download the private key and store it in a safe place.
2. Edit the options object in `mapkitjs-jwt-generator.js` so it contains the following information specific to your team and expiry date:
- keyid
- issuer
- expiresIn3. From the terminal. Run this script, passing in the path to the private key.
```
node jwt-generator.js path/to/your/key.here
```4. The terminal will output the JWT. Copy it and use in your projects.
## Acknowledgements
Adapted from a [blog post](https://www.jvt.me/posts/2020/02/19/sign-jwt-nodejs/) by [Jamie Tanna](https://twitter.com/jamietanna).