WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

herrmannplatz/mapkit-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mapkit-token

npm version

🗺 Easily generate MapKit JS authorization tokens.

Install

$ npm install mapkit-token

Usage

const generate = require('mapkit-token')

const key = fs.readFileSync('AuthKey_B1B1B1B1B1.p8')
const token = generate(key, 'B1B1B1B1B1', 'A1A1A1A1A1')

This generates an authorization token (valid for 30 minutes) which can be used to authorize against the mapkit JS API. Check the documentation on how to generate a key.

generate(authKey, keyId, teamId[, ttl, origin])

  • authKey: MapKit Authorization Key
  • keyId: MapKit JS Key ID.
  • teamId: Apple Developer Team ID.
  • ttl: Time to live in seconds. Defaults to 30 minutes.
  • origin: Domain restrictions. Optional but recommended.

Returns the authorizaton token.

About

🗺 Easily generate MapKit authorization tokens

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •