TwurpleAuthenticationGetting dataExamplesFAQMigration

createExternalJwt

Definition

createExternalJwt(config)

async

Creates a JWT with the role "external" to use with the various extension APIs.

ParameterTypeRequiredDefaultDescription
configExternalJwtConfignone

The configuration of the JWT to generate.

config.additionalDataRecord<string, unknown>nonenone
config.ownerIdstringnone

The user ID of the extension's owner.

config.secretstringnone

A valid extension secret to sign the JWT with.

config.ttlnumbernone

The time the JWT should be valid for, in seconds.

Defaults to 1 minute (60 seconds).

Return type: string