Before you use this feature, it is important to have the following in mind:
First, implement the User Identity Verification.
Then, enable the "Through workspace User identity verification" switch in the Authentication methods settings.
You can also select if all articles or only selected articles should be protected by switching the Access management mode.
Once the setup is done, you have several options to enable access to protected articles for your users.
To allow your users to access the protected content, you can use the special placeholder {{$hmac}}
in Product Fruits content. For example, you can create a link item in the Life Ring Button to your knowledge base in this format: https://help.myapp.com?{{$hmac}}
. By using this link, your users will get access to the knowledge base.
If you want to place this link somewhere in your UI, you can also construct the link manually. The knowledge base URL accepts the hmac
query parameter. In this JavaScript example, you can get the idea how to construct the link:
var hmac = {
username: "the current user username",
hmac: {
hash: "HMAC hash from your backend code",
expiration: expirationJsonDateTimeIfUsed ?? undefined // "yyyy-mm-ddThh:MM:ss"
}
}
console.log(`https://help.yourapp.com?hmac=${encodeURIComponent(JSON.stringify(hmac))}`)
You can put individual articles into the Life Ring button as you would put them normally. Product Fruits will take care of the verification. In this use case, verified users will be able to read the article inside of the Life Ring.