Skip to content

Discord

Nicholas K. Dionysopoulos edited this page Jun 24, 2024 · 2 revisions

Overview

The Akeeba Social Login - Discord integration plugin allows user on your site to use their Discord account to login or register a user account on your site.

Setup on Discord

DISCLAIMER: This part of our documentation describing the interaction with a third party service is for information purposes only. It should be treated as indicative and used at your own risk. Akeeba Ltd can only attest that this part of the documentation has been the faithful transcription of the steps we took at the time of its writing. We strongly recommend that you consult the documentation of the third party service for accurate instructions. Should the behavior of the third party service differ from what is published in our documentation you should consult the support of the third party service provider. Do not seek support from us for such matters; Akeeba Ltd cannot provide support for third party services, is not responsible for or notified about any changes in said services, nor is it obligated to update the documentation pursuant such changes.

Before you can use Discord login on your site you must create a Discord "app". Even though it sounds scary, a Discord App is simply a way for you to get a set of access codes which let you identify your site on Discord.

Go to the Discord Developer Portal's Applications page, sign in with your Discord account and click on the New Application button at the top right.

In the popup enter an application name and check the box. The name is shown to your site's visitors. Choose something which explains to them that they are logging into your site. Your site's name would be what you most likely want to put in here. Then click on Create.

In the new page select an icon (most likely your site's logo) and enter a description which explains what you are using this app for e.g. “Log into Your Site Name Here using your Discord user account!”.

Remember to enter the Terms of Service and Privacy Policy URLs of your site.

Click on the Save Changes button at the bottom of the page.

On the side menu click on OAuth2, General and then on the Add Redirect button.

The redirect URL you need to enter is your site's base URL plus index.php?option=com_ajax&group=sociallogin&plugin=discord&format=raw.

For example, if your site's base URL is https://www.example.com/foobar your redirect URL is https://www.example.com/foobar/index.php?option=com_ajax&group=sociallogin&plugin=discord&format=raw.

IMPORTANT! Discord considers http:// and https:// as well as the non-www and www domain names (e.g. example.com and www.example.com) to be different for the purpose of a redirection URL. If you can access your site as both HTTP and HTTP and as both non-www and www you will need to enter a total of four (4) redirection URLs. Same goes if your site is accessible over multiple subdomains or domains.

Click on the Save Changes button at the bottom of the page.

Now click on the Reset Secret button.

Copy the following information on this page:

  • Client ID This goes into the plugin's Discord Client ID field.
  • Client Secret This goes into the plugin's Discord Client Secret field.

Plugin options

Discord Client ID Enter the Client ID for your custom Discord OAuth2 Application here. See the previous section for creating a Discord Application.

Discord Client Secret Enter the Client Secret for your custom Discord OAuth2 Application here. See the previous section for creating a Discord Application.

Allow social login to non-linked accounts When enabled allows users to log in despite not having linked their Discord account to their site user account. Their Discord account's email address must be the same as the email account they use on your site.

Create new user accounts Creates a new Joomla! user when a user tries to log in via Discord but there is no Joomla! user account associated with that email or Discord User ID. If user registration is disabled no account will be created and an error will be raised. The new Joomla! user will have a username derived from the Discord account's name, the same email address as the Discord account and a long, random password (which the user can change once they have logged in). Set this to No to prevent creation of user accounts through Discord login.

Ignore Joomla! setting for creating user accounts When both this option and the Create new user accounts option above are enabled a new user will always be created, even if you have disabled user registration in the options of Joomla's Users page. This is useful to prevent anyone from registering to your site unless they have a Discord account.

Bypass user validation Only applies when creating new user accounts. When enabled the new user will be created active, without going through the Joomla! user account validation. This means that no account activation email will be sent to the user or the administrators of the Joomla! site. This makes perfect sense since Discord has already verified that the user is in control of the email address they are using with their Discord account.

Button styling When enabled custom CSS for login, link and unlink button styling will be output to the page header. Disable this option if you intend to use your own CSS to style the buttons.

Login buttons can be shown in In which part(s) of your site do you want to allow showing the Social Login buttons? For more information on how this feature works please consult the “Hiding in the frontend or backend” documentation page.