Skip to content

Commit

Permalink
Update README with code example
Browse files Browse the repository at this point in the history
  • Loading branch information
kchung committed Mar 9, 2020
1 parent 2a8880c commit d2a3d0e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Generate long-lived tokens from the CLI that can be used with the MapKit JS's [`authorizationCallback`](https://developer.apple.com/documentation/mapkitjs/creating_and_using_tokens_with_mapkit_js#3138220).

> Setting `authorizationCallback` to a function that returns a token as a string is useful for local development, or if you want to use a long-lived token with MapKit JS. Sign a token locally on your development machine with an expiration, then use the token directly in your code.
>
> ```
> mapkit.init({
> authorizationCallback(done) {
> done('your-generated-token-string-here');
> },
> });
> ```
### Features
* Verifies if the token works against MapKit servers
Expand Down

0 comments on commit d2a3d0e

Please sign in to comment.