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
- Domains on which Accesstype JS is to be used needs to be whitelisted in Accesstype at
Settings
>General
- 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 underSettings
>General
.
Code changes
- Change the script source to
https://accesstype.com/frontend/v2/accesstype.js?key=[YOUR_ACCOUNT_KEY]
- 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 asecret
token using HMAC SHA256 alogorithm. Thesecret
must matchJWT secret token
available atSettings
>General
for the corresponding accesstype account. Detailed explanation is available here. Docs on how to use Bridgekeeper Integrations are available here - If you are using metered paywal feature, then you need to Set User with
isLoggedIn
asfalse
, before checking for metered access. In v1, setting the user was not required for non logged-in users. Detailed explanation is here