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

feat: add AUTH_OIDC_NAME_CLAIM env variable #1830

Closed
Meierschlumpf opened this issue Jan 1, 2025 · 0 comments · Fixed by #1850
Closed

feat: add AUTH_OIDC_NAME_CLAIM env variable #1830

Meierschlumpf opened this issue Jan 1, 2025 · 0 comments · Fixed by #1850
Assignees
Labels
enhancement New feature or request

Comments

@Meierschlumpf
Copy link
Member

Describe the feature you'd like to request

For Synology SSO and probably some other SSO providers the preferred_username property does not exist, because they do not completely follow the OIDC standard. For those users that use those providers it would be beneficial to have this env variable to override the property.

Additional information

profile(profile) {
  return {
    id: profile.sub,
    // Use the name as the username if the preferred_username is an email address
    name:  env.AUTH_OIDC_NAME_CLAIM ? profile[env.AUTH_OIDC_NAME_CLAIM] : profile.preferred_username.includes("@") ? profile.name : profile.preferred_username,
    email: profile.email,
    provider: "oidc",
  };
},

Originally posted in discord get-help post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant