Steps to migrate from ATJS v1

Existing Quintype clients are advised to upgrade to ATJS v2 as soon as possible to avail the new features.
They can follow this guide to migrate to ATJS v2. ATJS v1 is deprecated and will not support the latest Accesstype features.

Configuration changes

  1. Domains on which Accesstype JS is to be used needs to be whitelisted in Accesstype at Settings > General
  2. Make sure Story Attributes endpoint is added in Accesstype and is working as expected. It is /api/story/attributes sketches endpoint. It can be configured under Settings > General.

Code changes

  1. Change the script source to[YOUR_ACCOUNT_KEY]
  2. Set User with an additional parameter accesstypeJwt for logged-in users. accesstypeJwt is used to authorize user and is required for a logged-in user. Its a JWT generated by the autherization service. It must be signed with a secret token using HMAC SHA256 alogorithm. The secret must match JWT secret token available at Settings > General for the corresponding accesstype account. Detailed explanation is available here. Docs on how to use Bridgekeeper Integrations are available here
  3. If you are using metered paywal feature, then you need to Set User with isLoggedIn as false, before checking for metered access. In v1, setting the user was not required for non logged-in users. Detailed explanation is here