danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, AWS, OpenAI, Assistants API, Azure, Groq, o1, GPT-4o, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
19.41k stars 3.24k forks source link

Enhancement: OAUTH/OIDC - enable mapping of JWT claims to user roles #4670

Open thingersoft opened 3 weeks ago

thingersoft commented 3 weeks ago

What features would you like to see added?

A chance to fully integrate LibreChat role system with external auth providers.

More details

Currently you can require specific claims to be present in JWT access or id token through the following env properties:

OPENID_REQUIRED_ROLE=
OPENID_REQUIRED_ROLE_TOKEN_KIND=
OPENID_REQUIRED_ROLE_PARAMETER_PATH=

To get full integration with external OAUTH/OIDC auth providers you should be able to map specific claims to specific LibreChat roles (USER/ADMIN at present).

Which components are impacted by your request?

Other

Pictures

No response

Code of Conduct