Hướng dẫn
01/07/2026
Hướng Dẫn Cấu Hướng Dẫn Cấu Hình Đăng Nhập Bằng Discord
Hướng Dẫn Cấu Hướng Dẫn Cấu Hình Đăng Nhập Bằng Discord (Tiếng Việt)
Tài liệu này hướng dẫn cách tạo và cấu hình ứng dụng Discord để phục vụ tính năng đăng nhập bằng Discord trên website của bạn.
Bước 1: Tạo ứng dụng mới trên Discord
- Truy cập trang Discord Developer Portal và đăng nhập bằng tài khoản Discord của bạn.
- Nhấn vào nút New Application (Ứng dụng mới) ở góc trên cùng bên phải.
- Nhập tên cho ứng dụng (ví dụ:
ZTruyen Login), đồng ý với các điều khoản của Discord và nhấn Create (Tạo).
Bước 2: Lấy thông tin Client ID và Client Secret
- Sau khi tạo ứng dụng, bạn sẽ tự động được chuyển hướng vào trang quản trị ứng dụng đó (mục General Information).
- Tại đây, bạn có thể tải lên ảnh đại diện ứng dụng (App Icon) và nhập mô tả ngắn nếu muốn. (Discord không bắt buộc xác minh thương hiệu phức tạp như Google nên bạn có thể đặt ảnh đại diện tùy ý).
- Truy cập vào mục OAuth2 ở danh sách menu bên trái.
- Tại trang OAuth2, bạn sẽ thấy mã Client ID (hoặc Application ID). Hãy sao chép mã này.
- Ngay bên dưới phần Client ID, nhấn nút Reset Secret rồi nhấn Yes, do it! để tạo và sao chép mã Client Secret. Lưu ý: Hãy lưu mã Client Secret này lại cẩn thận vì nó chỉ hiển thị một lần duy nhất.
Bước 3: Cấu hình Redirect URI (Đường dẫn chuyển hướng)
- Vẫn ở trang OAuth2, tìm mục Redirects.
- Nhấp vào nút Add Redirect.
- Nhập đường dẫn Callback nhận dữ liệu đăng nhập do Plugin WordPress cung cấp.
Ví dụ:
https://quangtuyen.vn/wp-login.php?loginSocial=discord - Nhấp vào nút Save Changes (Lưu thay đổi) màu xanh lá cây xuất hiện ở thanh bên dưới màn hình.
- Nhập cặp mã Client ID và Client Secret bạn vừa lưu vào trang cấu hình Plugin trên website WordPress của bạn để hoàn tất tích hợp.
Discord OAuth 2.0 Setup Guide (English)
This document provides step-by-step instructions to create and configure a Discord Application to enable Discord Sign-In on your website.
Step 1: Create a New Discord Application
- Go to the Discord Developer Portal and log in with your Discord account.
- Click the New Application button at the top right corner.
- Enter a name for your app (e.g.,
ZTruyen Login), agree to Discord’s Developer Terms, and click Create.
Step 2: Retrieve Client ID and Client Secret
- Once the application is created, you will be redirected to the General Information page.
- Here, you can upload an App Icon and write a short description if you wish. (Discord does not require rigorous brand verification like Google, so you can freely customize this).
- Navigate to the OAuth2 tab from the left sidebar menu.
- On the OAuth2 page, locate the Client ID (or Application ID). Copy this code.
- Below the Client ID, click the Reset Secret button, then click Yes, do it! to generate and copy your Client Secret. Save it securely, as it will only be shown once.
Step 3: Configure Redirect URI
- Still on the OAuth2 page, locate the Redirects section.
- Click the Add Redirect button.
- Enter the login Callback URL provided by your WordPress Discord login plugin.
Example:
https://quangtuyen.vn/wp-login.php?loginSocial=discord - Click the green Save Changes button that appears at the bottom banner of the page.
- Paste the copied Client ID and Client Secret into your WordPress website plugin configuration settings to complete the integration.