# How to integrate Unikname Connect with Discourse?

Unikname Connect can be easily integrated with Discourse with a simple plugin.
Unikname Connect has been designed to work with open-source solutions compatible with the OAuth/OpenID Connect authorization standard protocol. The famous open-source Discourse forum solution (opens new window), respectful of user privacy, is one of them.
Example
Our discussion Forum website has been built with Discourse.
👉 You're welcome to sign-up on our forum (opens new window) with your own @unikname.
To make integration very easy we've developed a specific ready-to-use plugin. Here under you will see how to install and setup this Discourse plugin.

Prerequisites
✔️ You've signed-up for a Unikname-Connect account. Required to get your API keys.
✔️ You've got and setup the Trust certificate for your website ✔️ During the sign-up process you've received your Unikname-Connect Account ID and your API secret key.📖 We assume you're familiar with the Discourse installation process.
# Step 1. Install Discourse plugin
Connect to your Discourse server, and access your container’s app.yml
file. It should be present in /var/discourse/containers/
)
Information
you can't install a plugin from the admin panel 😞
Enter the following command to edit your yml config file:
cd /var/discourse
nano containers/app.yml
Add the Discourse Unikname Connect plugin’s repository URL to your container’s app.yml
file:
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- ...
- sudo -E -u discourse git clone https://github.com/unik-name/discourse-unikname-connect-authentication-plugin
Add the plugin’s
git clone
url just belowsudo -E -u discourse git clone https://github.com/discourse/docker_manager.git
)
Rebuild the container:
cd /var/discourse
./launcher rebuild app
That’s it! You’ve successfully installed the Unikname Connect plugin on your Discourse instance!
# Step 2. Setup Discourse plugging
As an admin, go to the Discourse "burger" menu → admin → "Settings" tab → "Plugin" category.
You can also go to https://<your_discourse_forum_url>
/admin/site_settings/category/plugins?filter=plugin%3Adiscourse-unikname-connect-authentication-plugin
Then, configure the following attributes:
Attribut | Description |
---|---|
Unikname-Connect enabled | Of course, check this box to enable Unikname Connect login for your users |
Unikname-Connect Account ID | The Unikname-Connect Account ID you have received from Unikname's support request |
Unikname-Connect API secret key | The API secret key you have received from Unikname's support request |
UniknameConnect authorize scope | openid by default |
# Step 3. Test Unikname Connect on your Discourse Forum
Go to your Discourse Forum and click on the sign-up
button. You will see this new signup screen:

Choose with your @unikname
button, then you should see this page:

Finally enter your personal @unikname and validate the authentication on your smartphone. You're automatically redirected to the signup process on your forum.
Information
If you already have an account on your website, with your email, then you can Login to your forum with your eMail then go to preferences on your profil page, and link your @unikname with your account. For more info read the good post published by the community on our forum (opens new window).
All done!
New users are now able to use their @unikname SSID to sign-up to your Discourse Forum, and existing users can now link their account with their @unikname for further login with it.

# Troubleshooting
If you’re having issues when connecting (access denied ...), check that the credentials (the @unikname of your organization, Unikname Connect secret, client id/secret ...) you are using to connect to Unikname Connect authentication server are the good one.
Still need help?
Live-chat with us by clicking on this button on the right:
OR
Open a topic on our Unikname forum