跳到主内容

概述

Casdoor utilizes providers to offer third-party services for the platform. In this chapter, you will learn how to add providers to Casdoor.

What We Have

Currently, we have six types of providers:

  • OAuth Providers

    允许用户通过其他 OAuth 应用程序登录。 You can add GitHub, Google, QQ, and many other OAuth applications to Casdoor. For more details, please refer to the OAuth section.

  • 短信提供商

    当用户想要验证他们的电话号码时,Casdoor将发送短信给他们。 短信提供者被用来发送Casdoor短信。

  • 电子邮件提供商

    电子邮件提供者与短信提供者类似。

  • 存储提供商

    Casdoor allows users to store files using the local file system or cloud OSS services.

  • Payment Providers

    Casdoor 可以添加付款提供者,用于在产品页面上添加付款方法。 Currently, the supported payment providers include Alipay, WeChat Pay, PayPal, and GC.

  • Captcha Providers

    Casdoor支持在用户流程中配置验证码。 Currently, the supported captcha providers include Default Captcha, reCAPTCHA, hCaptcha, Aliyun Captcha, and Cloudflare Turnstile.

How to Configure and Use

范围

Providers have different scopes, which are determined by the creator. Only Administrators have the permission to add and configure providers. There are two types of Administrators in Casdoor:

  • Global Administrator: All users under the built-in organization and the users who enable IsGlobalAdmin. The providers created by the Global Administrator can be used by all applications.

  • Organization Administrator: Users who enable IsAdmin. The providers created by the Organization Administrator can only be used by the applications under the organization (under development...).

Add to Application

Follow the steps below to add providers to your application. Note that you cannot use the provider in your application until you have added it.

  1. 转到应用程序编辑页面并添加一个新的提供商。

    Provider_overview.添加

  2. Select a provider that you want to add to the application. You will see all the providers that the application can use.

    Provider_overview.选择

  3. For OAuth and Captcha providers, you can configure their usage. See OAuth and Captcha for more information.

    Provider_overview.配置

Finally, save the configuration. You can now try using the provider in your application.