GenAuth DocsDocuments
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
  • Single Page Web Application

  • Mobile and Client Applications

  • Standard Web Application

    • Java

    • Node.js

      • Installation and Usage
      • User Authentication Module
      • Management Module

        • User Management

        • Group Management

        • Role Management

        • Organization Management

        • 访问控制管理

        • 外部身份源管理

          • 获取身份源列表
          • 获取身份源详情
          • 创建身份源
          • 更新身份源配置
          • 删除身份源
          • 在某个已有身份源下创建新连接
          • 更新身份源连接
          • 删除身份源连接
          • 身份源连接开关
        • 自定义字段管理

    • Python

  • Framework Integration

  • Others

  1. Development Integration
  2. /
  3. Standard Web Application
  4. /
  5. Node.js
  6. /
  7. Management Module

  8. /
  9. 外部身份源管理

  10. /
  11. 在某个已有身份源下创建新连接

¶ 在某个已有身份源下创建新连接

Update time: 2025-07-23 07:34:21
Edit

在某个已有身份源下创建新连接,可以设置身份源图标、是否只支持登录等。

¶ 请求参数

名称类型必填默认值描述示例值
fieldsobject是-连接的自定义配置信息。{"clientId":"身份源上的 clientId","clientSecret":"身份源上的 clientSecret"}
displayNamestring是-连接在登录页的显示名称。登录页
identifierstring是-身份源连接标识。60b49eb83fd80adb96f26e68
typestring是-身份源连接类型。 枚举值:oidc,oauth,saml,ldap,ad,cas,azure-ad,alipay,facebook,twitter,google,wechat:pc,wechat:mobile,wechat:webpage-authorization,wechatmp-qrcode,wechat:miniprogram:default,wechat:miniprogram:qrconnect,wechat:miniprogram:app-launch,github,qq,wechatwork:corp:qrconnect,wechatwork:agency:qrconnect,wechatwork:service-provider:qrconnect,wechatwork:mobile,dingtalk,dingtalk:provider,weibo,apple,apple:web,baidu,lark-internal,lark-public,gitlab,linkedin,slack,yidun,qingcloud,gitee,instagram,welinkad
extIdpIdstring是-身份源连接 ID。60b49eb83fd80adb96f26e68
loginOnlyboolean否-是否只支持登录。
logostring否-身份源图标。https://files.authing.co/authing-console/social-connections/icon_xiaochengxu@2x.png

¶ 示例代码

import { ManagementClient } from "@genauth/nodejs";
// 在 Node.js 中引用:
// const { ManagementClient } = require('@genauth/nodejs');

const managementClient = new ManagementClient({
  accessKeyId: "GEN_AUTH_USERPOOL_ID",
  accessKeySecret: "GEN_AUTH_USERPOOL_SECRET",
});

(async () => {
  const result = await managementClient.createExtIdpConn({
    extIdpId: "60b49eb83fd80adb96f26e68",
    type: "ad",
    identifier: "60b49eb83fd80adb96f26e68",
    loginOnly: false,
    logo: "https://files.authing.co/authing-console/social-connections/icon_xiaochengxu@2x.png",
    displayName: "登录页",
    fields: {
      clientId: "身份源上的	clientId",
      clientSecret: "身份源上的	clientSecret",
    },
  });
})();

¶ 请求响应

类型: ExtIdpConnDetailSingleRespDto

名称类型描述
statusCodenumber业务状态码,可以通过此状态码判断操作是否成功,200 表示成功。
messagestring描述信息
apiCodenumber细分错误码,可通过此错误码得到具体的错误类型。
dataExtIdpConnDetail响应数据

示例结果:

{
  "statusCode": 200,
  "message": "操作成功",
  "apiCode": 20001,
  "data": {
    "id": "60b49eb83fd80adb96f26e68",
    "type": "default",
    "logo": "https://files.authing.co/authing-console/social-connections/icon_xiaochengxu@2x.png",
    "identifier": "60b49eb83fd80adb96f26e68",
    "displayName": "登录页",
    "loginOnly": true,
    "associationMode": "challenge",
    "challengeBindingMethods": "[\"email-password\"]",
    "fields": "60b49eb83fd80adb96f26e68"
  }
}

¶ 数据结构

¶ ExtIdpConnDetail

名称类型必填描述
idstring是身份源连接 id。 示例值: 60b49eb83fd80adb96f26e68
typestring是身份源连接类型。 枚举值:oidc,oauth,saml,ldap,ad,cas,azure-ad,alipay,facebook,twitter,google,wechat:pc,wechat:mobile,wechat:webpage-authorization,wechatmp-qrcode,wechat:miniprogram:default,wechat:miniprogram:qrconnect,wechat:miniprogram:app-launch,github,qq,wechatwork:corp:qrconnect,wechatwork:agency:qrconnect,wechatwork:service-provider:qrconnect,wechatwork:mobile,dingtalk,dingtalk:provider,weibo,apple,apple:web,baidu,lark-internal,lark-public,gitlab,linkedin,slack,yidun,qingcloud,gitee,instagram,welink
logostring是身份源图标。 示例值: https://files.authing.co/authing-console/social-connections/icon_xiaochengxu@2x.png
identifierstring否身份源连接标识。 示例值: 60b49eb83fd80adb96f26e68
displayNamestring否身份源连接在登录页的显示名称。 示例值: 登录页
loginOnlyboolean是是否只支持登录。 示例值: true
associationModestring是账号关联模式。 枚举值:none,field,challenge
challengeBindingMethodsarray是账号绑定方式。 示例值: ["email-password"]
fieldsobject是自定义参数。 示例值: 60b49eb83fd80adb96f26e68
Previous article: 删除身份源 Next article: 更新身份源连接
  • 请求参数
  • 示例代码
  • 请求响应
  • 数据结构

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.