Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] SSO login button is not clickable #6615

Open
malsch opened this issue Mar 1, 2025 · 5 comments
Open

[Bug] SSO login button is not clickable #6615

malsch opened this issue Mar 1, 2025 · 5 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@malsch
Copy link

malsch commented Mar 1, 2025

📦 Platform

Self hosting Docker

📦 Deploymenet mode

client db (lobe-chat image)

📌 Version

1.66.5

💻 Operating System

Windows

🌐 Browser

Firefox

🐛 Bug Description

Open the app, ask a question, and the app correctly requires me to login.

Problem: I'd like to use the SSO login, but when I click on the button "SSO Login", nothing happens.

I can click on "Close message" or I can also try to login with a password or with a custom API key. All these buttons are clickable.

📷 Recurrence Steps

In previous versions everything worked just fine:
docker pull lobehub/lobe-chat:v1.35.8
docker pull lobehub/lobe-chat:v1.35.14

It probably started with v1.52.0 that I cannot click the SSO login button.

I replicated this bug with Linux, English locale, and in Google Chrome.
You can try yourself on our test instance (v1.66.5): lobe-chat-test--s0lfwqx.wonderfulwater-4316e5c0.swedencentral.azurecontainerapps.io

Environment variables set:

NEXT_AUTH_SECRET=
NEXT_AUTH_SSO_PROVIDERS=microsoft-entra-id
AUTH_MICROSOFT_ENTRA_ID_ID=
AUTH_MICROSOFT_ENTRA_ID_SECRET=
AUTH_MICROSOFT_ENTRA_ID_TENANT_ID=
NEXTAUTH_URL=https://chat.soda-lab.org/api/auth
ENABLE_OAUTH_SSO=1
NEXT_PUBLIC_ENABLE_NEXT_AUTH=1

ACCESS_CODE=
AZURE_ENDPOINT=....openai.azure.com/
AZURE_API_KEY=
AZURE_API_VERSION=2025-01-01-preview
AZURE_MODEL_LIST=+gpt-35-turbo->gpt-35-turbo-1106=GPT-3.5 Turbo (2023-11-06),+gpt-4-turbo->gpt-4-turbo-2024-04-09=GPT-4 Turbo (2024-04-09)<8192:fc>,+gpt-4-vision-preview->gpt-4-turbo-vision-preview=GPT-4 Turbo with Vision Preview<8192:vision>,+gpt-4-0613->gpt-4-0613=GPT-4 (2023-06-13)<6000>,+gpt-4o->gpt-4o-2024-11-20=GPT-4o (2024-11-20)<30000:fc:vision>,+o1->gpt-o1-2024-12-17=OpenAI o1 (2024-12-17 - costly)<6000:reasoning>,+o3-mini->o3-mini-2025-01-31=OpenAI o3-mini (2025-01-31)<50000:reasoning:fc>
DEFAULT_AGENT_CONFIG=model=gpt-4o;provider=azure;chatConfig.enableAutoCreateTopic=true
OPENAI_MODEL_LIST=-all,+o1
OLLAMA_MODEL_LIST=-all,+llama3.1

🚦 Expected Behavior

SSO login dialogue starts when I click the button

📝 Additional Information

A different bug that may or may not be related:

If I enter the (correct) password (=the ACCESS_CODE environment variable), I get the error message: "OpenAI API Key is incorrect or empty, please check your OpenAI API Key and try again". This should not be required, because I don't use openAI models but Azure OpenAI.

@malsch malsch added the 🐛 Bug Something isn't working | 缺陷 label Mar 1, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 1, 2025
@lobehubbot
Copy link
Member

👀 @malsch

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Mar 1, 2025

Hello, @malsch! I'm here to help you with the SSO login button issue. Let's work together to get this sorted out!

The issue with the SSO login button not being clickable in version 1.66.5 of the lobe-chat application could be related to the deployment mode or environment variables. Here are a few things to check and try:

  1. Deployment Mode: SSO authentication is not supported in client DB mode as of version 1.62.4. You need to use the DB mode deployment configuration for SSO functionality to work [1].

  2. Environment Variables: Ensure that all necessary environment variables are correctly set. The NEXT_PUBLIC_ENABLE_NEXT_AUTH=1 is crucial for enabling Next Auth, especially when deploying with Vercel [2].

  3. JavaScript and Event Listeners: Verify that there are no JavaScript errors in the console that might be preventing the button from functioning. The SSO login button is implemented using the Button component from antd and is associated with the signIn function. Ensure that this function is correctly defined and accessible [3].

  4. Browser and Network Issues: Check for any browser extensions or network policies that might be blocking scripts or requests related to the SSO login process.

  5. Version Differences: Since the issue started with version 1.52.0, consider reviewing the changes made in that version related to SSO functionality. There might be updates or changes in the libraries used for SSO that could affect the button's behavior [4].

If these steps do not resolve the issue, further investigation into the specific implementation details or recent changes in the codebase might be necessary.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@malsch
Copy link
Author

malsch commented Mar 1, 2025

@dosu if SSO authentication is not supported in client DB mode, should it work with lobe-chat-pglite?

Copy link

dosubot bot commented Mar 1, 2025

SSO authentication should not work with lobe-chat-pglite if it is not supported in client DB mode. According to the documentation, SSO authentication is not supported in client DB mode for LobeChat version 1.62.4 and later. Users requiring SSO functionality must use the Server DB mode deployment configuration instead [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@anyidea
Copy link

anyidea commented Mar 3, 2025

Same issue, sso authentication not work now

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

3 participants