Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

fix: allow setting username in openIdStrategy (#744)

AndrejG82d79f585052d0
diff --git a/api/strategies/openidStrategy.js b/api/strategies/openidStrategy.js
index e0923a92e7..aa6e5d6d17 100644
--- a/api/strategies/openidStrategy.js
+++ b/api/strategies/openidStrategy.js
@@ -83,7 +83,7 @@ async function setupOpenId() {
} else {
user.provider = 'openid';
user.openidId = userinfo.sub;
- user.username = userinfo.given_name || '';
+ user.username = userinfo.username || userinfo.given_name || '';
user.name = fullName;
}