lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.57k stars 9.23k forks source link

[Request] 支持通用 OAuth2.0 / OIDC 协议的 SSO 登录 #3454

Closed Oniokey closed 2 weeks ago

Oniokey commented 1 month ago

🥰 需求描述

对于许多 SSO 系统,都实现了 OIDC 协议,例如 Casdoor 等等,可以适配标准 OIDC 协议来广泛增加适配的身份提供商(IdP)

🧐 解决方案

对于支持 well-known 能力的系统,可以通过 https://{server}/.well-known/openid-configuration 可以快速发现 authorization_endpoint token_endpoint userinfo_endpointscopes_supported 等 OIDC 登录流程中重要的接口,从而动态配置第三方 IdP 登录

📝 补充信息

No response

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


🥰 Description of requirements

For many SSO systems, the OIDC protocol is implemented, such as Casdoor and so on. The standard OIDC protocol can be adapted to widely increase the number of adapted identity providers (IdP).

🧐 Solution

For systems that support well-known capabilities, you can quickly discover authorization_endpoint token_endpoint userinfo_endpoint and scopes_supported and other OIDC login processes through https://{server}/.well-known/openid-configuration Important interfaces to dynamically configure third-party IdP logins

📝 Supplementary information

No response

lobehubbot commented 1 month ago

👀 @Oniokey

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

arvinxx commented 1 month ago

@cy948 NextAuth 支持对接通用 OAuth 2.0/OIDC 吗?

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@cy948 Does NextAuth support docking with universal OAuth 2.0/OIDC?

cy948 commented 1 month ago

@cy948 NextAuth 支持对接通用 OAuth 2.0/OIDC 吗?

支持

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@cy948 Does NextAuth support docking with universal OAuth 2.0/OIDC?

support

arvinxx commented 1 month ago

@Oniokey 能否介绍下如果支持了通用 OAuth 2.0/OIDC ,有什么收益不?

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@Oniokey, can you tell me what benefits there will be if universal OAuth 2.0/OIDC is supported?

cy948 commented 1 month ago

若社区没有支持你当前的provider,你也可以自行fork并维护。NextAuth中使用通用provdier可以参考文档:https://authjs.dev/guides/configuring-oauth-providers#use-your-own-provider

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


If the community does not support your current provider, you can also fork and maintain it yourself. To use the general provdier in NextAuth, please refer to the documentation: https://authjs.dev/guides/configuring-oauth-providers

mujiannan commented 1 month ago

wellknown-url 是可以直接在浏览器中打开查看内容的,里面包含一些重要信息,如issuer、scopes等。
从你的SSO-Serverwellknown-url 拿到这些信息后,将它们当作Auth0 配置即可。

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


wellknown-url can be opened directly in the browser to view the content, which contains some important information, such as issuer, scopes, etc.
After getting this information from the wellknown-url of your SSO-Server, configure it as Auth0.

lobehubbot commented 2 weeks ago

✅ @Oniokey

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。

lobehubbot commented 2 weeks ago

:tada: This issue has been resolved in version 1.14.9 :tada:

The release is available on:

Your semantic-release bot :package::rocket: