Ombi-app / Ombi

Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
http://ombi.io
GNU General Public License v2.0
3.71k stars 395 forks source link

auto create account with SSO, email ? #5118

Open devildant opened 4 months ago

devildant commented 4 months ago

Summary

Hello, I use the Enable authentication option with header variable, it works perfectly with my sso. but I don't know where to put the email header: X-Forwarded-Email my user is created using the "X-Forwarded-user" header, but the user is created without email

Ombi Version

4.43.5

What platform(s) does this occur on?

Docker

What database are you using?

SQLite (Default)

Relevant log output

No response

devildant commented 3 months ago

it's maybe a feature request ?

tidusjar commented 3 months ago

Yeah sort of. But should be simple to add

shwetd19 commented 3 months ago

Hey there 👋,

It's a practical issue that could streamline the user creation process with SSO.

Since users are currently created without an email due to the absence of this header, finding the right place to incorporate it is key.

A potential fix could involve modifying the authentication handler to explicitly look for the X-Forwarded-Email header alongside the X-Forwarded-User header. This might involve adjusting the middleware or the user creation logic to ensure the email is captured and stored correctly.

Would it be possible to let me tackle this?

Cheers, @shwetd19

tidusjar commented 3 months ago

Yes 100% happy for you to take a look!