Include JWT js library

Hi there,

We need to sign url request using JWT. So, we want to include a library to do so (JSON Web Token Libraries - jwt.io)

How can we include external libraries in Play Canvas scripts?

Thank you.

Luis

PlayCanvas Editor can work with an external JS library that can be included in the browser. Once you have that, you can either add the library as a JS file in the project and have it load before/after engine or as an asset

If you have a URL instead from a CDN, you can use external scripts in project settings:

From a quick look:

https://github.com/kjur/jsrsasign (CDN link https://github.com/kjur/jsrsasign#or-include-in-html-from-many-cdn-sites)
https://github.com/square/js-jose (see dist folder)

Have builds of their library that will work directly in the browser.