The defaultAccessToken appears in the source of the html

When I upload html to netlity using Cesiun.JS, the defaultAccessToken appears in the source.

Is this a problem?

How can I hide it?

Hi,

The client will always need to have an access token to use Cesium ion so you won’t be able to avoid including it in the source.

If you are deploying an application, we recommend creating a unique access token for that application instead of using the default access token. That will allow you to limit the scope of access to just what is needed by the application. It will also let you as well as revoke the old access token and create a new one without impacting any of your other applications.

Hi @mdc9001,

How do I make the access token unique to that application?

And,
I would also like to know how to revoke an old access token and create a new one without affecting other applications.

You can create a new token and set the Allowed Urls property to include just the URL of your application. That will prevent the access token being used from other sites.

To revoke the access token, you can just delete it. Before you delete it you probably want to create a new one with the same values and add the new token into your application so there is no down time.

See this page about access tokens for more information.

1 Like

Thanks @mdc9001,

I was able to create an application-specific access token as intended.