Casdoor集成市场

ZITADEL | 身份提供商

用 ZITADEL 登录 Casdoor

Add ZITADEL to Casdoor as an OpenID Connect provider, self-hosted or ZITADEL Cloud, and people sign in to your Casdoor applications with their ZITADEL accounts.

Casdoor 官方核验OIDCPKCE云服务或自托管
你需要一个正在运行的 Casdoor,自己部署或用 Casdoor 云都可以。示例中的 https://auth.example.com 请换成你的 Casdoor 地址(Casdoor 云上类似 https://acme.casdoor.com),其他 example.com 地址也换成你自己的。

用 Casdoor 配置 ZITADEL

  1. 1

    Create a web application

    In the ZITADEL Console, open the project the application belongs to (or create one), click New under its applications and choose Web.

  2. 2

    Choose Code and add the redirect URI

    Pick the Code authentication method: Casdoor sends the client secret with HTTP Basic authentication, which is what Code expects. Then add the redirect URI:

    Redirect URIshttps://auth.example.com/callback
  3. 3

    Copy the credentials

    Create the application. ZITADEL shows the Client ID and Client Secret once, so copy both now.

  4. 4

    在 Casdoor 中添加 ZITADEL 提供商

    在 Casdoor 控制台打开 提供商,点击 添加,填写:

    类别OAuth
    类型OIDC
    显示名称ZITADEL
    客户端ID<client ID>
    客户端密钥<client secret>
    Issuer链接https://zitadel.example.com
    认证URLhttps://zitadel.example.com/oauth/v2/authorize
    Token链接https://zitadel.example.com/oauth/v2/token
    范围openid profile email
    UserInfo链接https://zitadel.example.com/oidc/v1/userinfo
    登出URLhttps://zitadel.example.com/oidc/v1/end_session
    启用PKCE开启

    点击 Issuer链接 旁边的 请求,会从 ZITADEL 的 discovery 文档自动填好其余地址。同一个组织里所有 OIDC 类型的提供商都通过同一个字段关联用户,所以如果这个组织已经有一个 OIDC 提供商,请把 类型 改成 Custom Flexible,它按提供商分别关联账号。

  5. 5

    把提供商加到应用上

    打开 应用,编辑用户登录的那个应用,在它的 提供商 标签页添加这个提供商。之后登录页上就会出现 ZITADEL 按钮。

注意事项

  • ZITADEL's preferred_username is the login name, such as alice@acme.zitadel.cloud, and Casdoor uses it as the username of new users. Set a user mapping for username in Casdoor if you want something else.
  • ZITADEL only accepts plain-http redirect URIs in Development mode, so use https for Casdoor.

ZITADEL 的设置取自它的官方文档(核对于 2026年10月:ZITADEL OIDC endpoints、ZITADEL claims、ZITADEL applications)。ZITADEL 是其所有者的商标。

常见问题

Do I need User Info inside ID Token?

No. Casdoor also calls ZITADEL's userinfo endpoint, which returns the name and email.

Can I use the PKCE authentication method instead?

That method issues no client secret, while Casdoor's provider is a confidential client. Use Code; Casdoor sends a PKCE challenge on top of the secret anyway.