跳到主内容

概述

Casdoor allows for the use of other OAuth applications as a sign-in method.

Currently, Casdoor supports multiple OAuth application providers. The icons of these providers will be displayed on the login and signup pages once they have been added to Casdoor. The following are the providers that Casdoor supports:

ProviderLogoProviderLogoProviderLogoProviderLogo
ADFSAlipayAmazonApple
Auth0AzureADBaiduBattle.net
BilibiliBitbucketBoxCasdoor
Cloud FoundryDailymotionDeezerDigitalOcean
DingTalkDiscordTiktokDropbox
Eve OnlineFacebookFitbitGitea
GiteeGitHubGitLabGoogle
HerokuInfluxCloudInfoflowInstagram
IntercomKakaoLarkLastfm
LineLinkedInMailruMeetup
MicrosoftNaverNextcloudOkta
OneDriveOuraPatreonPayPal
QQSalesforceShopifySlack
SoundCloudSpotifySteamStrava
StripeTikTokTumblrTwitch
TwitterTypetalkUberVK
WeChatWeComWeiboWePay
XeroYahooYammerYandex
ZoomEmailSMS

我们将向您展示如何申请第三方服务并将其添加到Casdoor。

申请成为开发者

在此之前,你需要理解一些概念。

  • RedirectUrl, 认证后重定向地址, 填写您的应用程序地址, 例如 https://forum.casbin.com/
  • Scope,用户授予您的权限,如基本个人资料,电子邮件地址和帖子及其他。
  • ClientId/AppId, ClientKey/AppSecret, 这是最重要的信息 而且这是您在申请开发者帐户后需要得到的信息。 您 无法与任何人共享 的密钥。

添加 OAuth 提供商

  1. Go to your Casdoor index page.
  2. Click on Providers in the top bar.
  3. Click on Add, and you will see a new provider added to the list at the top.
  4. Click on the new provider to make changes to it.
  5. In the Category section, select OAuth.
  6. Choose the specific OAuth provider that you require from the Type dropdown.
  7. Fill in the necessary information, such as Client ID and Client Secret.

Application Setup

  1. Click on Application in the top bar and select the desired application to edit.
  2. Click on the provider add button and choose the newly added provider.
  3. Modify the provider's permissions, such as enabling registration, login, and unbinding.
  4. You're all set!