WordPress.org

Taiwan 正體中文

  • 佈景主題目錄
  • 外掛目錄
  • 最新消息
  • 技術支援
  • 關於我們
  • 團隊
  • 取得 WordPress
取得 WordPress
WordPress.org

Plugin Directory

Simple Discord SSO ( Single Sign-On )

  • 提交外掛
  • 我的最愛
  • 登入
  • 提交外掛
  • 我的最愛
  • 登入

這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Simple Discord SSO ( Single Sign-On )

由 Jay Wood 開發
下載
  • 詳細資料
  • 使用者評論
  • 安裝方式
  • 開發資訊
技術支援

外掛說明

This plugin allows discord users ( verified or not ) to login to your WordPress website as a subscriber. With a slew of available
hooks developers are able to both listen to, and customize, various events during the login process. Complete with a customizable login button,
or you can code your own and unhook this one.

Important Caching Information

This plugin uses a custom rewrite rule for the login button. You may want to ensure the /discord-login path in your WordPress
installation is not cached.

Saved User Data

When logging in, if the user does not have an account one is created for them automatically using their Username and Discriminator
field. The default scope is identify email which allows your site to store their discord information to your database for
other discord-related usage.

The following fields are saved to the simple_discord_sso user meta key for all discord users:
* id: the user’s id
* avatar: the user’s avatar hash
* discriminator: the user’s 4-digit discord-tag
* public_flags: the public flags on a user’s account
* flags: the flags on a user’s account
* banner: the user’s banner hash
* accent_color: the user’s banner color encoded as an integer representation of hexadecimal color code
* locale: the user’s chosen language option
* mfa_enabled: whether the user has two factor enabled on their account
* premium_type: the type of Nitro subscription on a user’s account
* verified: whether the email on this account has been verified
* hash: Just an MD5 hash which is used to determine if these fields should be updated on every login.

Various actions and filters are available, should you want to expand on these fields ( if new fields are added ) just look over
the Discord User Resource for more fields.

Actions/Filters

Various actions and filters are available from changing the redirect URL after login, changing the scope of the discord request,
or even halting the login ( and maybe redirecting after ) depending on the user’s discord information. Or, even if you want, you can
listen for the login and hook into right before the redirect. The goal with the slew of actions and filters is to allow developers
to customize the plugin how they see fit.

Think we need more? Awesome, open a ticket on the GitHub Repository – the plugin is actively maintained so I’d be happy to help out.

螢幕擷圖

  • The login button.
  • Logo Colors.
  • Button Background Colors.

安裝方式

From your WordPress dashboard

  1. Visit Plugins > Add New.
  2. Search for Simple Discord SSO. Find and Install Simple Discord SSO.
  3. Activate the plugin from your Plugins page.

From WordPress.org

  1. Download Simple Discord SSO.
  2. Unzip and upload the simple-discord-sso directory to your /wp-content/plugins/ directory.
  3. Activate Simple Discord SSO from your Plugins page.

Post Installation

You will now need to create an App on discord. To do that follow the below instructions:
1. Sign-in to discord and create an app on the Dashboard.
2. Name your app something obvious ( WordPress SignOn for example )
3. Fill out the initial information for legal reasons, it’s suggested ( but not required ) you have a Terms of Service page and a Privacy Policy if you are using this plugin.
4. Click OAuth2 on the left sidebar.
5. Click General under OAuth2.
6. You must add a redirect back to your site. So click Add Redirect and enter your site’s full URL to the WordPress install.
7. Copy the Client ID and the Client Secret
8. Now log into your WordPress installation and navigate to WP Admin > Discord SSO
9. Add the Client ID and Client Secret to your settings. Click Save/Update.
10. Your site is now allows Discord users to sign in.

常見問題集

How can I change user roles from subscriber when they sign in

There’s a filter for that. It’s simple_discord_sso/default_role which defaults to subscriber and also receives the user resource array from the Discord API.

How can I change the URL they’re redirected to?

There’s a filter for that. It’s simple_discord_sso/login_redirect which defaults to home_url() and also receives the WP_User object.

How do I allow users to login without using wp-login.php?

To use the login, you only need to redirect the user to /discord-login – this is a custom rewrite to fire off the sign-on
process. Alternatively you can use the query parameter instead /?discord=1.

使用者評論

Good plugin unfortunately not usable

scsudo 2023 年 1 月 18 日
The plugin works fine. Unfortunately, the login button is not displayed correctly, but is only a small purple box. Therefore unfortunately not usable. Edit: A small update: It seems that the button is not displayed incorrectly everywhere after all. However, the behavior is very different between Chromium-Based, Firefox and Safari. The problem that only a small purple box exists seems to occur only with Firefox.
閱讀全部 0 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Simple Discord SSO ( Single Sign-On )〉的開發相關工作。

參與者
  • Jay Wood

將〈Simple Discord SSO ( Single Sign-On )〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

1.0.2

  • Small versioning update for plugin submission.
  • Automatically update permalinks if required on init.

1.0.1

  • Small updates to readme

1.0.0

  • Initial release.

中繼資料

  • 版本 1.0.2
  • 最後更新 3 年前
  • 啟用安裝數 20+
  • WordPress 版本需求 5.0 或更新版本
  • 已測試相容的 WordPress 版本 5.8.10
  • PHP 版本需求 7.4 或更新版本
  • 語言
    English (US)
  • 標籤
    discordDiscord Logindiscord serversocial login
  • 進階檢視

評分

3 星,滿分為 5 星
  • 0 個 5 星使用者評論 5 星 0
  • 0 個 4 星使用者評論 4 星 0
  • 1 個 3 星使用者評論 3 星 1
  • 0 個 2 星使用者評論 2 星 0
  • 0 個 1 星使用者評論 1 星 0

新增使用者評論

查看全部使用者評論

參與者

  • Jay Wood

技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

檢視技術支援論壇

  • 關於我們
  • 最新消息
  • 主機代管
  • 隱私權
  • 展示網站
  • 佈景主題目錄
  • 外掛目錄
  • 區塊版面配置目錄
  • Learn
  • 技術支援
  • 開發者資源
  • WordPress.tv ↗
  • 共同參與
  • 活動
  • 贊助基金會 ↗
  • Five for the Future
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

Taiwan 正體中文

  • 查看我們的 X (之前的 Twitter) 帳號
  • Visit our Bluesky account
  • Visit our Mastodon account
  • Visit our Threads account
  • 造訪我們的 Facebook 粉絲專頁
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our TikTok account
  • Visit our YouTube channel
  • Visit our Tumblr account
程式碼,如詩