Client Authentication in PSPDFKit Instant

To use PSPDFKit Instant for React Native, authenticate your client with your running Document Engine instance. This can be done by generating a JSON Web Token (JWT) and sending it to the client. In most cases, your backend application will generate and send the JWT to the client. The client can then use the JWT to authenticate itself with Document Engine, which will return only the data that the user is authorized to view.

A JWT typically grants access to a specific document and the Instant layer combination. If you’re having difficulty generating valid JWTs, you can use the Document Engine dashboard to validate them.

Additionally, as seen in our Catalog project example, you’ll need to initialize the PSPDFKit Instant viewer with the license key or demo key to open a PDF document:

PSPDFKit.setLicenseKey('Enter your license key here');
	// ...document configuration