Adding Comments to Your Blog with Single Sign-on using Hyvor Talk and Auth0
Tags: comments, webdev, authentication
Published: 2020-05-20 12:45:44

This guide will show you how to add comments to your blog or website with single sign-on using Hyvor Talk and Auth0.

**[Hyvor Talk](https://talk.hyvor.com/)** is a fully customizable commenting platform with all moderation tools you need. It supports two single sign-on (SSO) methods: Stateless and OpenID Connect-based. In this article, we are going to use OpenID Connect-based SSO with Auth0.

**[Auth0](https://auth0.com/)** is an identity provider, and it is compatible with the OpenID Connect protocol.

(If you are using any other identity provider that is compatible with OpenID Connect than Auth0, the process is almost the same.)

Use Case
--------

Your product (main website) uses Auth0 as the identity provider. And, you also have a WordPress-powered or any other blog. Your clients have to either create a WordPress account or an account in a third-party commenting provider to comment on the blog. That's not what your users love. They love to use their account on your main system. Hyvor Talk is here for your help. With our SSO, you can connect the Hyvor Talk commenting system with your account system with a few clicks.

Prerequisites
-------------

In this guide, I assume that you are familiar with Auth0 and using it with your system. So, I assume that you have created a tenant with Auth0. If not, I suggest you reading [Auth0's getting started guide](https://auth0.com/docs/getting-started).

Single Sign-on is only available on our business plan. You can test everything with the 4 days trial that we offer. Learn more about Hyvor Talk plans [here](https://talk.hyvor.com/plans).

Setting up Hyvor Talk
---------------------

-   Visit the Hyvor Talk console (<https://talk.hyvor.com/console>). It will redirect you to create a Hyvor account. After verifying the account, you'll be redirected back to the console.
-   You are now in the **Add Website** section of the console. Simply, add a name and your domain here and click **ADD**.

![](https://talk.hyvor.com/blog/wp-content/uploads/2020/05/image-7.png)

Adding your website

-   Next, follow the instructions in the **Install** section based on your platform.

![](https://talk.hyvor.com/blog/wp-content/uploads/2020/05/image-9.png)

Choose your platform

You have just installed Hyvor Talk on your website! By default, users are required to log in with a Hyvor account to comment. Let's set up SSO now.

Setting up Single Sign-on
-------------------------

### 1\. Setting up a new Auth0 Application

-   Go to the Auth0 dashboard and create a new application.

![](https://talk.hyvor.com/blog/wp-content/uploads/2020/05/image-10.png)

-   Add a **Name**, choose **Regular Web Application**, and click Create.

![](https://talk.hyvor.com/blog/wp-content/uploads/2020/05/image-11.png)

-   The Settings tab includes all the data that we need in the next step.

![](https://talk.hyvor.com/blog/wp-content/uploads/2020/05/image-12.png)

### 2\. Setting up SSO on Hyvor Talk

-   Go to **Account -> SSO** section in the console.

![](https://talk.hyvor.com/blog/wp-content/uploads/2020/05/image-13.png)

-   Next, create a new SSO ID.
    -   Type -- Select **OpenID Connect**
    -   Issuer URL -- **Domain** in Auth0 (Settings tab) -- Make sure to prepend `https://` to the domain.
    -   Client ID -- **Client ID** in Auth0
    -   Client Secret -- **Client Secret** in Auth0

![](https://talk.hyvor.com/blog/wp-content/uploads/2020/05/image-15.png)

-   After clicking Create, simply click Assign websites and assign your website to the current SSO ID.
-   Final Step: Add the following URL to **Allowed Callback URLs** in the Auth0 application settings tab and save changes.\
    `https://talk.hyvor.com/web-api/openid-login`

![](https://talk.hyvor.com/blog/wp-content/uploads/2020/05/image-16.png)

Now, when you load Hyvor Talk on your website, you'll see the magical log in button which will redirect you to your issuer's login page.

Yay! Now your users don't have to create another account on Hyvor Talk, WordPress, or any other system to comment on your website. They **can just use their account on your application**. They are now so happy!

![](https://i.giphy.com/media/l46C52IJdRfvCGyVW/giphy.webp)

Conclusion
----------

As you saw, it's just a work of a few minutes to set up Single Sign-on with Hyvor Talk when you are using an OpenID Connect-compatible identity provider like Auth0.

You can learn more about how SSO works and how to moderate SSO websites from our documentation. Start from the [Single Sign-on introduction](https://talk.hyvor.com/documentation/sso/introduction).

If you have any questions, feel free to comments below.

*Originally published on [Hyvor Talk Blog](https://talk.hyvor.com/blog/comments-with-single-sign-on-using-hyvor-talk-and-auth0/)*