ข้ามไปยังเนื้อหาหลัก

การตั้งค่าแอปพลิเคชัน

After you deploy Casdoor on your server and set up your organization, you can now configure your applications!

Let's see how to configure your application's authentication using Casdoor.

หมายเหตุ

ตัวอย่างเช่น ฉันต้องการตั้งค่าฟอรัมของฉันโดยใช้ Casnode.

I create my application and fill in the necessary configuration details.

Select the organization I created so that users in this organization can access this application.

องค์กร

เนื่องจากองค์กรนี้มีชื่อว่า my_organization, ฉันจึงเลือกมันจากเมนูแบบดรอปดาวน์.

เลือกองค์กร

ต่อไป ฉันต้องการให้ผู้ใช้ของฉันสามารถใช้ Casdoor เพื่อการตรวจสอบสิทธิ์เมื่อพวกเขาลงทะเบียน. I fill in the redirect URL here as https://your-site-url.com/callback.

คำเตือน

Please note that the callback URL in the provider application should be Casdoor's callback URL, while the Redirect URL in Casdoor should be your website's callback URL.

ความเข้าใจเพิ่มเติม

เพื่อให้กระบวนการตรวจสอบสิทธิ์ทำงานได้ ขั้นตอนที่ละเอียดคือดังนี้:

  1. ผู้ใช้ส่งคำขอไปยัง Casdoor.
  2. Casdoor ใช้ Client ID และ Client Secret เพื่อตรวจสอบสิทธิ์กับ GitHub, Google หรือผู้ให้บริการอื่นๆ.
  3. If the authentication is successful, GitHub calls back to Casdoor to notify it about the successful authentication. Therefore, the GitHub authorization callback URL should be your Casdoor callback URL, which is http://your-casdoor-url.com/callback.
  4. Casdoor จากนั้นจะแจ้งให้แอปพลิเคชันทราบเกี่ยวกับความสำเร็จในการตรวจสอบสิทธิ์. นั่นหมายความว่า URL สำหรับการเปลี่ยนเส้นทางของ Casdoor ควรเป็น URL สำหรับการเปลี่ยนเส้นทางของแอปพลิเคชันของคุณ ซึ่งคือ http://your-site-url.com/callback.

Verification Code Settings

You can configure the Code resend timeout to control how long users must wait before requesting another verification code via email or SMS. Set the value in seconds (default is 60). This setting determines the countdown timer duration shown to users on the login page. A value of 0 will use the global default.

เคล็ดลับ

หากคุณต้องการทำการตั้งค่าที่กำหนดเองมากขึ้นสำหรับวิธีการลงชื่อเข้าใช้ของแอปพลิเคชัน เช่น การปิดการใช้งานวิธีการลงชื่อเข้าใช้บางวิธีหรือปิดการใช้งานวิธีการลงชื่อเข้าใช้บางวิธี คุณสามารถอ้างอิงไปยัง วิธีการลงชื่อเข้าใช้