应用程序配置
当你在你的服务器上部署你的casdoor并设置你的组织后,你可以现在就部署你的应用程序!
让我们看看如何使用Casdoor配置您的应用程序的身份验证!
For example, I want to set up my Forum using Casnode.
I create my application and fill in some necessary configurations.
Select the organization I created so that users in this organization can use this application.
Since this organization is named my_organization
, I choose it from the drop-down menu.
Next, I want my users to be able to use Casdoor for authentication when they sign up. So, 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, and the Redirect URL
in Casdoor should be your website's callback URL.
Further Understanding
To make the authentication process work, the detailed steps are as follows:
- Users send a request to Casdoor.
- Casdoor uses the
Client ID
andClient Secret
to authenticate with GitHub, Google, or other providers. - If the authentication is successful, GitHub calls back to Casdoor to notify Casdoor about the successful authentication. Therefore, the GitHub authorization callback URL should be your Casdoor's callback URL, which is http://your-casdoor-url.com/callback.
- Casdoor then informs the application about the authentication success. This means that the Casdoor callback URL should be your application's callback URL, which is http://your-site-url.com/callback.
:::
You can also add third-party apps for sign up by adding providers and setting their properties.
Note that if you don't want users to access your app using a username/password, you can switch off the Password On
button. This way, users can only access the app using third-party services.