Simple library to create JSON Web Tokens (JWTs) that can be provided to secure routes so that only authenticated requests that contain a valid token can connect to the APIs.
*This was taken entirely from Amit Agarwal from here.
To add this library to your script file, do the following in the Apps Script code editor:
- Click on the menu item "Resources > Libraries..."
- In the "Add a Library" text box, enter the script ID
19Qtg9LvQn25h3tIrNJclER2s5TRmpX8QNNL9Ix0Z72o1Go3pl852_zEg
and click the "Add" button. - Choose a version in the dropdown box (usually best to pick the latest version).
- Click the "Save" button.
In the new editor:
- Click on the plus sign next to Libraries
- In the Script ID text box, enter the script ID
19Qtg9LvQn25h3tIrNJclER2s5TRmpX8QNNL9Ix0Z72o1Go3pl852_zEg
and click the "Lookup" button. - Choose a version in the dropdown box (usually best to pick the latest version).
- Specify an Identifier (this is the name that will be referenced throughout your script)