alist icon indicating copy to clipboard operation
alist copied to clipboard

希望支持自定义OAuth2.0单点登录

Open luluxiaoyu opened this issue 7 months ago • 7 comments

Please make sure of the following things

  • [x] I have read the documentation.
  • [x] I'm sure there are no duplicate issues or discussions.
  • [x] I'm sure this feature is not implemented.
  • [x] I'm sure it's a reasonable and popular requirement.

Description of the feature / 需求描述

已看过关闭的issue #3914 提到了使用Casdoor接入更多平台,似乎并没有实现自定义的oauth2.0 的单点登录,但是单独再搭建一个比较麻烦且需要跳两次 希望添加的自定义登录类似这种:https://nezha.wiki/guide/q14.html

Suggested solution / 实现思路

配置如下字段实现用户登录绑定:

client_id

OAuth 2.0 客户端 ID。 client_secret

OAuth 2.0 客户端密钥。 endpoint.auth_url

授权端点。 endpoint.token_url

令牌端点。 endpoint.scopes

指定的权限列表,需要根据情况填写。 endpoint.user_info_url

第三方网站的用户 API 端点。 endpoint.user_id_path

用户 API 中代表 ID 的字段。

Additional context / 附件

No response

luluxiaoyu avatar May 20 '25 03:05 luluxiaoyu

See

  1. 68% #3914

github-actions[bot] avatar May 20 '25 03:05 github-actions[bot]

现在alist支持单点登录,具体配置流程参考:https://alistgo.com/zh/guide/advanced/sso.html

gunzhibin avatar May 20 '25 06:05 gunzhibin

现在alist支持单点登录,具体配置流程参考:https://alistgo.com/zh/guide/advanced/sso.html

是,但是只有GitHub,微软,谷歌,钉钉这四个 没法自定义其他的平台

luluxiaoyu avatar May 20 '25 06:05 luluxiaoyu

可以添加自定义OAuth,只是教程里面没有,下拉框里面的OIDC就是自定义OAuth

catfishlty avatar May 22 '25 10:05 catfishlty

可以添加自定义OAuth,只是教程里面没有,下拉框里面的OIDC就是自定义OAuth

好像不是我想要那种 我想要那种自定义是类似Github的那种实现 自定义三个地址,授权地址,授权码换token地址,以及获取用户信息的api

luluxiaoyu avatar May 22 '25 10:05 luluxiaoyu

可以添加自定义OAuth,只是教程里面没有,下拉框里面的OIDC就是自定义OAuth

好像不是我想要那种 我想要那种自定义是类似Github的那种实现 自定义三个地址,授权地址,授权码换token地址,以及获取用户信息的api

参考这个试试,如果你的OIDC Provider支持.well-known理论上就可以 https://github.com/AlistGo/alist/issues/3914#issuecomment-2614488362

catfishlty avatar May 22 '25 11:05 catfishlty

可以添加自定义OAuth,只是教程里面没有,下拉框里面的OIDC就是自定义OAuth

好像不是我想要那种 我想要那种自定义是类似Github的那种实现 自定义三个地址,授权地址,授权码换token地址,以及获取用户信息的api

设置里的OIDC是标准客户端实现,我自己写的OIDC服务器都可以正常工作

yandongxu0821 avatar Aug 23 '25 08:08 yandongxu0821