Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 869 Bytes

README.md

File metadata and controls

27 lines (16 loc) · 869 Bytes

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. 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
    • expiresIn
  3. From the terminal. Run this script, passing in the path to the private key.

node jwt-generator.js path/to/your/key.here
  1. The terminal will output the JWT. Copy it and use in your projects.

Acknowledgements

Adapted from a blog post by Jamie Tanna.