Migrating to V3

On 1st of August 2023, we released Hyvor Talk V3, a complete redesign of our commenting system using Web Components.

Timeline

  • 2023-08-01: V3 is released.
  • 2024-01-01: V2 deprecated, no longer receiving updates.
  • 2024-08-01: V2 embeds and APIs are no longer supported. V2 code will try to load V3 automatically.

Am I using V2?

If you are not sure whether you are using V2 or V3, you can check the code on your website. If you have a code similar to the following, you are using V2:

<div id="hyvor-talk-view"></div>
<script type="text/javascript">
	var HYVOR_TALK_WEBSITE = YOUR_WEBSITE_ID;
	var HYVOR_TALK_CONFIG = {
		url: false,
		id: false
	};
</script>
<script async type="text/javascript" src="//talk.hyvor.com/web-api/embed"></script>

Or, you can check the source code in the browser inspector. If you see an <iframe>, you are using V2.

Automatic Migration

Starting from 1st of August 2024, the V2 script started to automatically load V3. This is to prevent your website from breaking. However, there might be some cases where the automatic migration might not work.

If you still have the V2 code on your website, we highly recommend you to manually migrate to V3 to ensure the best performance and compatibility.

How to Update your code

To migrate to v3, follow these steps:

If you are using:
  • WordPress: Upgrade the WordPress plugin to the latest version.
  • Blogger: Blogger users should remove the old widget and re-install

1. Installation Code

Currently, you have a code similar to below on your website:

<div id="hyvor-talk-view"></div>
<script type="text/javascript">
    var HYVOR_TALK_WEBSITE = YOUR_WEBSITE_ID;
    var HYVOR_TALK_CONFIG = {
        url: false,
        id: false
    };
</script>
<script async type="text/javascript" src="//talk.hyvor.com/web-api/embed"></script>

You have to remove this code from your website and then follow our installation guide to install version 3.

Important! When changing the code, you have to make sure the old HYVOR_TALK_CONFIG.id matches with the page-id attribute in the new <hyvor-talk-comments> element.

For example, if you have id: false as the following:

var HYVOR_TALK_CONFIG = {
    id: false
}

Set page-id="" (This will use the canonical URL of the page to identify it)

If you have a dynamic ID similar to the following code:

var HYVOR_TALK_CONFIG = {
    id: "<?php echo $post->id; ?>"
}

Make sure to use the same: page-id="<?php echo $post->id; ?>" in the new element.

2. Stateless SSO

If you use Stateless Single Sign-on, you have to update the code that generates the user data and hash in your back-end.

These are the new changes:

  • In the user object, timestamp is now required (to expire hashes).
  • The user object now supports bio, location, and badges fields (optional).
  • SHA256 is used in HMAC instead of the SHA1
  • SSO configurations are now added to the <hyvor-talk-comments> element instead of the HYVOR_TALK_CONFIG object.
  • Login URL is now added in the Console, instead of in the configuration code.
  • Signup URL is no longer supported.

See the Stateless SSO guide for a complete tutorial.

3. OpenID Connect SSO

If you use OpenID Connect SSO, only one minor change is required. Add the following URL as a callback URL in your OpenID Connect provider:

https://talk.hyvor.com/embed/oidc

4. Webhooks

V3 changes the webhook format and how signature is created. You have to update your webhook code to support the new format.

The changes are:

  • Webhook body is now a JSON object instead of a query string.
  • You can now generate a webhook secret from the Console.
  • The signature field is no longer supported.
  • The X-Signature header is now used to verify the signature.

See webhooks for a complete tutorial.