MapKit JS authorization token invalid for Chinese network

Hello 👋🏼,

We are using MapKit JS to display maps on our application working on two domains .com and .cn. Everything is working for all ours users in the world except for users using Chinese local network.

After investigation, there is an error display in the browser console:

[MapKit] Initialization failed because the authorization token is invalid.

As the tokens are used as they are for the rest of the world, we know that they are valid... 😕

Problem appears on all browsers:

Current versions of MapKit JS

  • mapkit-typescript @ 5.18.2
  • https://cdn.apple-mapkit.com/mk/5.49.x/mapkit.js

Do you have any tips, suggestions to help us 🙏 ?

Aurélien.

Hi,

It is likely your JWT token is not set correctly. A JWT token is origin-restricted, unless you are deploying a JWT token without origin-restriction (NOT recommended), your token will not likely work on both domains.

Please file a developer feedback if you believe it is an issue on our end.

I'm experiencing the same issue. My token is fine when visiting the website from anywhere other than China. When on a Chinese network, it says invalid token.

MapKit JS authorization token invalid for Chinese network
 
 
Q