You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/advanced-usage/plugins/com.msgbyte.iam.md

1.1 KiB

sidebar_position title
3 iam - 第三方登录

com.msgbyte.iam

IAM 插件提供第三方登录功能

目前支持:

  • github

配置方式

Github

Github 中创建 OAuth 应用。获得 Client IDClient secrets

配置Github应用的授权回调地址Authorization callback URL{API_URL}/api/plugin:com.msgbyte.iam/github/redirect。注意,API_URL 为环境变量中的值,两者应当保持一致。

配置Tailchat环境变量:

  • IAM_GITHUB_ID
  • IAM_GITHUB_SECRET

分别为之前获取到的Client IDClient secrets

你也可以通过环境变量重写请求地址,例如使用代理:

安全强化

为了token的安全不被恶意应用获取建议增加前端域名校验。

在环境变量中配置IAM_FE_URL即可,值为前端域名。如: IAM_FE_URL=http://localhost:11011

用于 window.opener.postMessage(<data>, "IAM_FE_URL")