A Jellyfin account that has a username (ex: JohnDoe), the same username in Organizr and with an email of [email protected], SSO fails. But when you either change the Jellyfin account name to the email set in Organizr or manually change the email in Organizr to the username (ex: JohnDoe) SSO works.
1) Set a username in Jellyfin
2) Set a username with the same username in Organizr
3) Set an email in Organizr
4) Sign in
5) Sign in is successful but Jellyfin SSO does not work
6) Either change the Jellyfin account name to the email set in Organizr or manually change the email in Organizr to the username
7) Sign in again, SSO works
I encountered the same thing while creating the Jellyfin-SSO functionality. The problematic line is #2967 in api/classes/organizr.class.php : permalink to line / expression
That line, so long email is not empty and not beginning with 'placeholder', evaluates to the email. I believe on the contrary, it should result in the username by all means but I didn't dig into any other applications' SSO functionality so I wouldn't know, maybe others do prefer email?
At the time of writing Jellyfin-SSO functionality I wasn't sure about this so I didn't change it.
@causefx is the described functionality (of returning with email and therefore calling sso functions with the email as the username) a feature or a bug? :D
Actually, same issue with Ombi-SSO for me. I feel like the discussed line should simply be $ssoUser = $result['username']
the issue is some apps allow username and or email to login. i have to go back and check all approved sso apps.
Sent from my iPhone
On Dec 15, 2020, at 2:19 PM, markv9401 notifications@github.com wrote:

Actually, same issue with Ombi-SSO for me. I feel like the discussed like should simply be $ssoUser = $result['username']—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
the issue is some apps allow username and or email to login. i have to go back and check all approved sso apps.
…
Sent from my iPhone
On Dec 15, 2020, at 2:19 PM, markv9401 @.*> wrote:  Actually, same issue with Ombi-SSO for me. I feel like the discussed like should simply be $ssoUser = $result['username'] — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
I'm just throwing out an idea, but try to fetch the SSO token for the username first and if no token is returned then use the email?
Or try to fetch the SSO token for both the username and email, and use the one that comes back valid. If both comes back valid drop one and use the other.
the issue is some apps allow username and or email to login. i have to go back and check all approved sso apps.
Wouldn't it be a better solution for the future (as you mentioned some apps might need email, most need username, etc.) to pass the whole $result dictionary (the whole User object) to ssoCheck function and inside sso-functions.php there could be a mapping as to which app gets which key-values from the $result dict?
yep that would be best... we can make the change
On December 15, 2020 at 10:42 PM, markv9401 notifications@github.com wrote:
the issue is some apps allow username and or email to login. i have to go back and check all approved sso apps.
…
Sent from my iPhone
On Dec 15, 2020, at 2:19 PM, markv9401 @.*> wrote:  Actually, same issue with Ombi-SSO for me. I feel like the discussed like should simply be $ssoUser = $result['username'] — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Wouldn't it be a better solution for the future (as you mentioned some apps might need email, most need username, etc.) to pass the whole $result dictionary (the whole User object) to ssoCheck function and inside sso-functions.php there could be a mapping as to which app gets which key-values from the $result dict?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks for this, just came across this issue myself. You have come so far with Organizr just wanted to say thank you for your work, been using it for years and it's just perfect.
Thanks for this, just came across this issue myself. You have come so far with Organizr just wanted to say thank you for your work, been using it for years and it's just perfect.
thank you for the kind words @ibracorp
@Cookie-Monster-Coder fyi causefx merged the pr, you can try the v2-develop, should work now :)