Casdoor集成市场

Portainer | 应用集成

Portainer 单点登录

Portainer's custom OAuth provider works with Casdoor's OAuth 2.0 endpoints, so people manage containers with their Casdoor account instead of a separate Portainer password.

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

用 Casdoor 配置 Portainer

  1. 1

    在 Casdoor 中注册 Portainer

    在 Casdoor 控制台打开 应用,为 Portainer 添加一个应用,在它的 OIDC/OAuth 标签页复制 客户端ID 和 客户端密钥。把下面的地址加到 重定向URLs:

    • https://portainer.example.com
  2. 2

    Configure OAuth in Portainer

    In Portainer, open Settings → Authentication, choose OAuth, turn on Use SSO and Automatic user provisioning, pick the Custom provider and fill in:

    Client ID<client ID>
    Client secret<client secret>
    Authorization URLhttps://auth.example.com/login/oauth/authorize
    Access token URLhttps://auth.example.com/api/login/oauth/access_token
    Resource URLhttps://auth.example.com/api/userinfo
    Redirect URLhttps://portainer.example.com
    User identifierpreferred_username
    Scopesopenid profile email
  3. 3

    Sign in

    Save and log out. The Portainer login page now has a Login with OAuth button that sends users to Casdoor.

注意事项

  • New users created by automatic provisioning have no access until you add them to a team or give them access to an environment.
  • The Redirect URL in Portainer and in Casdoor must be the address people open Portainer at, exactly.

Portainer 的设置取自它的官方文档(核对于 2026年10月:Portainer OAuth);另见Casdoor 文档。Portainer 是其所有者的商标。

常见问题

Can Casdoor groups become Portainer teams?

Mapping OAuth groups to Portainer teams is a Portainer Business Edition feature. In the Community Edition, assign users to teams in Portainer.

Why preferred_username as the user identifier?

It is the Casdoor username in the userinfo response, so Portainer usernames match Casdoor's. You can use email instead if you prefer.