PSA: MKJS tokens with duplicate claims are invalid

Just wanted to give a heads up since I've seen a few people posting about issues with tokens. Duplicate claims will cause a MapKit JS token to be invalid. So if everything else looks right with your setup, this is something to check.


(re-posting from https://forums.developer.apple.com/thread/113721)


To check your token for duplicate claims, execute this at the command line (substitute your token for your-token-here, but keep the quotes around it):


echo "your-token-here" | tr "." "\n" | head -2 | base64 -D


To check just the token header, use `head -1` in the above command.


I hope this helps! Also there's a new piece of documentation available on tokens, Creating and Using Tokens with MapKit JS.