Social Media Authentication
Flute integrates social media authentication using the HybridAuth library, providing support for multiple platforms. To add authentication via a specific social media platform, you need to choose the corresponding driver and fill in the required data.
Setting up Authentication with Discord
-
Creating or Configuring a Discord Application:
- Go to Discord Applications.
- Create a new application or edit an existing one.
-
Configuring OAuth2:
- Inside your bot's settings, navigate to the
OAuth2
tab. - Set the Redirect URI in the following format:
https://mysite.com/social/Discord
and https://mysite.com/profile/social/bind/Discord`.
warning**Important!
Replace
mysite.com
with your domain.Depending on the authorization method, the last part of the URI will change, e.g.
Steam
,Yandex
, etc.The URI must be strictly case-matched! Discord is not discord, etc.
- Inside your bot's settings, navigate to the
-
Obtaining Client ID and Client Secret:
- Copy the Client ID and Client Secret from the respective fields.
-
Entering Data into Flute:
- Enter the copied data in the Flute driver settings. Be careful not to mix up the
id
andsecret
.
- Enter the copied data in the Flute driver settings. Be careful not to mix up the
Adding Social Media Icons
The default Flute template allows adding custom icons for each social media platform. You can use icons from phosphoricons or embed SVG icons directly. Example with Discord:
Using Phosphor icons:
<i class="ph ph-discord-logo"></i>
Embedding SVG:
<svg>....</svg>