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

fix: Enable OIDC with Synology SSO Server #4544

Merged

Conversation

JoTec2002
Copy link
Contributor

What type of PR is this?

(REQUIRED)

  • feature
  • bug

What this PR does / why we need it:

Mealie required the name claim from an OIDC Provider, but the Synology SSO Server doesn't Provide this claim.

After this Pull Request Mealie will no longer required the name claim to be present.

To not cause any issues or lose any OIDC user information the following logic is used:
If the name claim is present it will be used, otherwise the username will be used as name.

Which issue(s) this PR fixes:

Fixes #4543

@MuadDibVV
Copy link

+1

@cmintey
Copy link
Contributor

cmintey commented Nov 14, 2024

I think it would be better and more extensible to introduce a new env var OIDC_NAME_CLAIM, which would default to name, but you could override it to whatever you want.

@JoTec2002 JoTec2002 changed the title Enable OIDC with Synology SSO Server fix: Enable OIDC with Synology SSO Server Nov 15, 2024
@michael-genson
Copy link
Collaborator

@JoTec2002 if you could take a look at the feedback from @cmintey we should be able to get this merged!

@JoTec2002
Copy link
Contributor Author

@cmintey I completed the changes you suggested.

Copy link
Contributor

@cmintey cmintey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! One more small thing to address

mealie/core/security/providers/openid_provider.py Outdated Show resolved Hide resolved
Copy link
Contributor

@cmintey cmintey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

@michael-genson michael-genson enabled auto-merge (squash) November 19, 2024 14:07
@michael-genson michael-genson merged commit 426f91f into mealie-recipes:mealie-next Nov 19, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - OIDC with Synology not working
4 participants