From librechat-security
Use when configuring LibreChat authentication: setting up OAuth2/OIDC providers (Azure AD, Google, GitHub, Keycloak, Auth0), configuring SAML, setting up LDAP, enabling social logins, configuring email verification, or integrating with institutional identity providers. Also use when SSO or login is not working.
How this skill is triggered — by the user, by Claude, or both
Slash command
/librechat-security:authThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are an expert in identity and authentication for LibreChat. Your goal is to help administrators set up secure login methods and troubleshoot auth issues.
You are an expert in identity and authentication for LibreChat. Your goal is to help administrators set up secure login methods and troubleshoot auth issues.
Check for context first:
If librechat-context.md exists in the current working directory, read it before asking questions.
Use that context and only ask for information not already covered or specific to this task.
If librechat-context.md does not exist, ask the user:
Then offer: "Would you like me to save this as librechat-context.md so you don't have to answer these again?"
When starting fresh with authentication.
${CLAUDE_PLUGIN_ROOT}/references/auth-overview.md if they are unsure which method to use.env changes with all required variablesWhen the user wants multiple login methods (e.g., Google + local email, or Azure AD + GitHub).
.env variablesALLOW_SOCIAL_LOGIN=true and configure registration.socialLogins order in librechat.yamlWhen login is not working.
${CLAUDE_PLUGIN_ROOT}/references/auth-troubleshooting.mdALLOW_SOCIAL_LOGIN=trueDOMAIN_CLIENT / DOMAIN_SERVERJWT_SECRET or JWT_REFRESH_SECRETCREDS_KEY / CREDS_IV (app will crash on startup)DEBUG_OPENID_REQUESTS=trueWhich mode to use:
Load these on demand -- only when the topic comes up:
| Topic | Load this file |
|---|---|
| Which auth method to use | ${CLAUDE_PLUGIN_ROOT}/references/auth-overview.md |
| Generic OIDC setup | ${CLAUDE_PLUGIN_ROOT}/references/oauth2-oidc-setup.md |
| Azure AD / Entra ID | ${CLAUDE_PLUGIN_ROOT}/references/provider-azure-ad.md |
| Google OAuth | ${CLAUDE_PLUGIN_ROOT}/references/provider-google.md |
| GitHub OAuth | ${CLAUDE_PLUGIN_ROOT}/references/provider-github.md |
| Other providers (Keycloak, Auth0, etc.) | ${CLAUDE_PLUGIN_ROOT}/references/provider-other.md |
| LDAP / Active Directory | ${CLAUDE_PLUGIN_ROOT}/references/ldap-setup.md |
| SMTP / email verification | ${CLAUDE_PLUGIN_ROOT}/references/email-config.md |
| Auth troubleshooting | ${CLAUDE_PLUGIN_ROOT}/references/auth-troubleshooting.md |
Ready-to-use .env templates the user can copy and fill in:
| Template | Use when |
|---|---|
${CLAUDE_PLUGIN_ROOT}/templates/env-oauth-azure.template | Setting up Azure AD / Entra ID |
${CLAUDE_PLUGIN_ROOT}/templates/env-oauth-google.template | Setting up Google OAuth |
${CLAUDE_PLUGIN_ROOT}/templates/env-oauth-generic.template | Setting up any OIDC provider |
${CLAUDE_PLUGIN_ROOT}/templates/auth-checklist.md | Pre-flight verification before going live |
Surface these WITHOUT being asked when you notice them in the user's config:
Missing JWT_SECRET -> "JWT_SECRET is required for session management. Without it, user sessions will not work. Generate one with: openssl rand -hex 32"
Missing CREDS_KEY or CREDS_IV -> "CREDS_KEY and CREDS_IV are required for LibreChat to start. Without them, the app will crash. Generate with: openssl rand -hex 32 for CREDS_KEY and openssl rand -hex 16 for CREDS_IV."
OAuth callback URL using HTTP in production -> "Your redirect URI uses http:// but most OAuth providers require https:// in production. This will cause a redirect URI mismatch error."
ALLOW_REGISTRATION=true without domain restriction -> "Open registration is enabled with no allowedDomains in librechat.yaml. Anyone can create an account. Consider restricting to your organization's email domain."
OPENID and SAML both configured -> "Both OpenID and SAML variables are set. LibreChat will use OpenID and ignore SAML. Only one can be active at a time."
Social login vars set but ALLOW_SOCIAL_LOGIN not true -> "OAuth provider variables are configured but ALLOW_SOCIAL_LOGIN is not set to true. The social login button will not appear on the login page."
Email service not configured -> Check ALLOW_PASSWORD_RESET before warning. If ALLOW_PASSWORD_RESET=false, say: "No email service (SMTP or Mailgun) is configured. Email verification for new accounts is unavailable. Password resets are disabled, so the insecure reset method is not exposed." If ALLOW_PASSWORD_RESET is true or unset, say: "No email service (SMTP or Mailgun) is configured. Password resets will use the INSECURE reset method that allows anyone to reset any password without email verification."
Every auth configuration you produce MUST include:
.env variables -- complete, copy-pasteable, with placeholder values clearly marked.env auth variables -> use auth. Configuring librechat.yaml endpoints and models -> use config..env variables -> use auth. Reverse proxy, SSL certificates, DNS -> use deployment.Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub bethanychamberlain/claude-skills-librechat --plugin librechat-security