From d2a3d0e14701ac0548cea49cb6efd5d34652c373 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Sun, 8 Mar 2020 21:52:04 -0700 Subject: [PATCH] Update README with code example --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 8c613e4..8d2f3ed 100644 --- a/README.md +++ b/README.md @@ -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