causefx / Organizr

HTPC/Homelab Services Organizer - Written in PHP
GNU General Public License v3.0
5.1k stars 289 forks source link

[V2] Plex oAuth succesful but login fails #970

Closed mvanlijden closed 5 years ago

mvanlijden commented 5 years ago
Organizr Version: V 2.0.0-beta.800
Branch: Develop
WebSever: Nginx
Operating System: docker organizrtools/organizr-v2 on UnRaid 6.6.3

Problem Description:

After enabling Plex oath in the settings trying to log in with my admin's Plex oAuth fails. However the oAuth itself seems to have been succesfully completed. The notifcation "oAuth Successful - Please wait..." appears. However also the error "Login error - Wrong username/email/password combo" also appears. Login is cancelled afterwards.


Reproduction Steps:

Set up a new docker, set up admin account (tried one with my Plex admin data and also a fresh one with another user & email & password) In Authentication enable Organizr DB + Backend and select Plex. Get Plex Token and Get Plex Machine works fine on this part. Switch Plex oAuth on Log out and try to log back in with Plex oAuth


Errors on screen? If so paste here:

Login error - Wrong username/email/password combo
oAuth Successful - Please wait...
mvanlijden commented 5 years ago

Using another browser session i did manage to login with Plex user from my girlfriend, using Google link to log into Plex. No user was present before logging in. Was created fine....

My own Plex user can log into Plex site normally (also using Google login), get tokens for access and machines normally... Don't know what is different, besides the fact that i have PlexPass and she does not.

causefx commented 5 years ago

On settings page, do you have plex admin username filled in?

causefx commented 5 years ago

do you have the plex admin username filled in on the settings page?

Sent from my iPhone

On Oct 30, 2018, at 2:25 PM, Maarten van Lijden notifications@github.com wrote:

Organizr Version: V 2.0.0-beta.800

Branch: Develop

WebSever: Nginx

Operating System: docker organizrtools/organizr-v2 on UnRaid 6.6.3

Problem Description:

After enabling Plex oath in the settings trying to log in with my admin's Plex oAuth fails. However the oAuth itself seems to have been succesfully completed. The notifcation "oAuth Successful - Please wait..." appears. However also the error "Login error - Wrong username/email/password combo" also appears. Login is cancelled afterwards.

Reproduction Steps:

Set up a new docker, set up admin account (tried one with my Plex admin data and also a fresh one with another user & email & password) In Authentication enable Organizr DB + Backend and select Plex. Get Plex Token and Get Plex Machine works fine on this part. Switch Plex oAuth on Log out and try to log back in with Plex oAuth

Errors on screen? If so paste here:

Login error - Wrong username/email/password combo oAuth Successful - Please wait... — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

mvanlijden commented 5 years ago

Don't know why, i tried setting and resetting this before too. But now it works ok..... Still very glad! Can now disable the Organizr DB authentication on go Plex only :)

From the text in the SSO settings i have one other question. For me it not clear what the SSO on Ombi and Tautulli does... Because both use the same Plex login to work. Is it that because Plex is enabled as SSO, that it can be used to auto login with Ombi and Tautulli? It's not very clear from a user perspective. What do you have to fill with Token in the Ombi OSS? the Plex Token of the Ombi API key? Both seem not to work...

causefx commented 5 years ago

for Ombi SSO, you need to fill in ombi url and ombi api key.

once its setup, you can log out and back in... if username and password matches ombi, you can now: be auto logged into ombi url (automatically works with /ombi) if ombi is on subdomain, you need to add /auth/cookie to the end of url.

for tautulli, same info needed... this can be either directory or subdomain.... this will auto log that user in, only if guest access is enabled for that user in tautulli settings.

jaydee99 commented 5 years ago

Hi,

Ombi SSO is broken for me with last update...

Regards

causefx commented 5 years ago

can you goto debug area and click Ombi SSO.

debug is under user menu

Sent from my iPhone

On Oct 31, 2018, at 7:27 AM, jaydee99 notifications@github.com wrote:

Hi,

Ombi SSO is broken for me with last update...

Regards

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jaydee99 commented 5 years ago

{ "enabled": true, "cookie": false, "url": true, "api": true }

mvanlijden commented 5 years ago

Ombi SSO also not working here, Same debug output { "enabled": true, "cookie": false, "url": true, "api": true }

Created new API key also to test, but no go.

causefx commented 5 years ago

When everything is true except cookie, that means that ombi rejected the credentials org supplied to them. if using oAuth make sure you are on 3.0.3950

jaydee99 commented 5 years ago

It doesn't work using oAuth or not and i'm on latest ombi release... It was working perfectly with last version of Organizr and i didn't change anything...

EDIT : Actually ombi is 3.0.3945... I have to wait for docker image update to tell you if it's ok with 3950 ;) But i'm using it without OAuth enabled so it should work like it was before... any other idea ?

causefx commented 5 years ago

i have to research this a bit more as nothing really has changed.

mvanlijden commented 5 years ago

Might be, but it is still not working here... All dockers are updated to latest release, still same version numbers as above (Ombi 3.0.3945) Attached are all relevant settings. API key from Ombi is entered in Organzr v2 of course but hidden for privacy. screenshot 4 screenshot 1 screenshot 2 screenshot 3

causefx commented 5 years ago

on the single sign on page for ombi, please put in http://localip:port of ombi instance

jaydee99 commented 5 years ago

Still not working with http://localip:port

mvanlijden commented 5 years ago

Doesn't work either here....

causefx commented 5 years ago

can everyone try ombi 3.0.3950

mvanlijden commented 5 years ago

can everyone try ombi 3.0.3950

Would love to if it is released into the latest linuxserver docker image, but it hasn't yet.

causefx commented 5 years ago

just chg img to:

lsiodev/ombi-preview

you can always change back - or make a backup

causefx commented 5 years ago

also everyone recheck your plex machine ID

jaydee99 commented 5 years ago

Updated with lsiodev/ombi-preview and now working perfect ! Thanx !!

causefx commented 5 years ago

awesome

dejected1 commented 5 years ago

my ombi sso wasnt working on latest master build: 3.0.3945 after the latest organizr update. i just updated to latest ombi developer build: 3.0.3966. SSO still not working. i tried logging into organizr with Plex OAuth and without. I also tried with and without Plex OAuth in ombi as well.

my sso debug shows { "misc": { "oAuthLogin": true, "rememberMe": true, "rememberMeDays": "7" }, "plex": { "enabled": true, "cookie": true, "machineID": "OMITED", "token": true, "oAuthEnabled": true, "backend": true }, "ombi": { "enabled": true, "cookie": false, "url": true, "api": true }, "tautulli": { "enabled": true, "cookie": true, "url": true } }

my logs also state: Ombi Token Function - Ombi did not return Token

Looks like the cookie isnt created for ombi? i tried clearing all cookies and cache as well. tatutulli sso is working ok.

mvanlijden commented 5 years ago

SSO on Ombi from Organzr still not working... Ombi stable is updated to 3.0.3988. Organizr still on 2.0.0-beta.800 but latest docker. Logging in manually with Plex OAuth in Ombi also takes a while. Here are the debug settings..

{ "misc": { "oAuthLogin": true, "rememberMe": true, "rememberMeDays": "7" }, "plex": { "enabled": true, "cookie": true, "machineID": "<>", "token": true, "oAuthEnabled": true, "backend": true }, "ombi": { "enabled": true, "cookie": false, "url": true, "api": true }, "tautulli": { "enabled": true, "cookie": true, "url": true } }

causefx commented 5 years ago

is ombi oAuth enabled?

mvanlijden commented 5 years ago

is ombi oAuth enabled?

it was. I changed the SSO settings for ombi url from "/ombi" to "http://IP:3579/ombi" and now seems to be working. Debug confirms it. Maybe an idea to create a instruction / helptext for the field what format it should be. Other places in Organzr /ombi is enough, but for SSO the local IP:Port/Dir is needed.

{ "misc": { "oAuthLogin": true, "rememberMe": true, "rememberMeDays": "7" }, "plex": { "enabled": true, "cookie": true, "machineID": "cad5d5042c719690f8d5fcb8cef82aac1ec3084b", "token": true, "oAuthEnabled": true, "backend": true }, "ombi": { "enabled": true, "cookie": true, "url": true, "api": true }, "tautulli": { "enabled": true, "cookie": true, "url": true } }

dejected1 commented 5 years ago

i tried changing the organizr ombi sso settings to http://ip:port/ombi. still no go. I tried https:domain/omib, no go. I tried getting a new token from plex and ombi. no go. Debug says cookie: false for ombi sso. this was working prior to last organizr update. ive also updated ombi to 4007, no change.

kimsbrian commented 5 years ago

Don't know why, i tried setting and resetting this before too. But now it works ok..... Still very glad! Can now disable the Organizr DB authentication on go Plex only :)

From the text in the SSO settings i have one other question. For me it not clear what the SSO on Ombi and Tautulli does... Because both use the same Plex login to work. Is it that because Plex is enabled as SSO, that it can be used to auto login with Ombi and Tautulli? It's not very clear from a user perspective. What do you have to fill with Token in the Ombi OSS? the Plex Token of the Ombi API key? Both seem not to work...

I'm having the same problem and can't seem to fix it. Do you remember what you reset?

causefx commented 5 years ago

can you post the debug part of SSO?

Sent from my iPhone

On Dec 24, 2018, at 1:30 AM, kimsbrian notifications@github.com wrote:

Don't know why, i tried setting and resetting this before too. But now it works ok..... Still very glad! Can now disable the Organizr DB authentication on go Plex only :)

From the text in the SSO settings i have one other question. For me it not clear what the SSO on Ombi and Tautulli does... Because both use the same Plex login to work. Is it that because Plex is enabled as SSO, that it can be used to auto login with Ombi and Tautulli? It's not very clear from a user perspective. What do you have to fill with Token in the Ombi OSS? the Plex Token of the Ombi API key? Both seem not to work...

I'm having the same problem and can't seem to fix it. Do you remember what you reset?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

kimsbrian commented 5 years ago

{ "misc": { "oAuthLogin": false, "rememberMe": true, "rememberMeDays": "7" }, "plex": { "enabled": true, "cookie": true, "machineID": true, "token": true, "oAuthEnabled": true, "backend": true }, "ombi": { "enabled": true, "cookie": true, "url": "http://localhost:5000", "api": true }, "tautulli": { "enabled": true, "cookie": true, "url": "http://localhost:8181" } }

causefx commented 5 years ago

what is the issue that is happening to you?

kimsbrian commented 5 years ago

Same as the original poster. When it's someone other than me who tries to login to Organizr using Plex, they receive "Login error - Wrong username/email/password combo" but it also shows "oAuth Successful - Please wait..."

This is a copy and paste from the Discord. Would appreciate it if anyone could help me out. I'm running Plex behind a reverse proxy using nginx. I can successfully login with Plex oAuth on my admin account but my friends and any test accounts I made failed with the error. "Login error - Wrong username/email/password combo" even though it says oAuth was Successful. Someone else also had this issue https://github.com/causefx/Organizr/issues/970 but doesn't really say how he fixed it other than that he reset something. I believe it might have something to do with remote access not being enabled. I'm behind a double nat so I'm using a VPS to port forward which then hosts the reverse proxy I use to remotely access Plex. Additionally, I feel like it could also be related to how I can't automatically find my Plex machine id. I successfully find my Plex token but there's no drop down to select the Plex machine. The same thing happens in Ombi so I have to manually find the machine id to populate the field. It works on Ombi so I know the machine ID is correct. Thanks in advance :smiley:

dejected1 commented 5 years ago

SSO for ombi still doesn't work. Was working before last organizr update. No changes made and it stopped working. i tried changing the organizr ombi sso settings to http://ip:port/ombi. still no go. I tried https:domain/omib, no go. I tried getting a new token from plex and ombi. no go. Debug says cookie: false for ombi sso. this was working prior to last organizr update. ive also updated ombi to 4007, no change.

{ "misc": { "oAuthLogin": true, "rememberMe": true, "rememberMeDays": "7" }, "plex": { "enabled": true, "cookie": true, "machineID": "OMITTED", "token": true, "oAuthEnabled": true, "backend": true }, "ombi": { "enabled": true, "cookie": false, "url": true, "api": true }, "tautulli": { "enabled": true, "cookie": true, "url": true } }

causefx commented 5 years ago

can you test it for a non admin acct

Sent from my iPhone

On Dec 25, 2018, at 4:44 PM, dejected1 notifications@github.com wrote:

SSO for ombi still doesn't work. Was working before last organizr update. No changes made and it stopped working. i tried changing the organizr ombi sso settings to http://ip:port/ombi. still no go. I tried https:domain/omib, no go. I tried getting a new token from plex and ombi. no go. Debug says cookie: false for ombi sso. this was working prior to last organizr update. ive also updated ombi to 4007, no change.

{ "misc": { "oAuthLogin": true, "rememberMe": true, "rememberMeDays": "7" }, "plex": { "enabled": true, "cookie": true, "machineID": "OMITTED", "token": true, "oAuthEnabled": true, "backend": true }, "ombi": { "enabled": true, "cookie": false, "url": true, "api": true }, "tautulli": { "enabled": true, "cookie": true, "url": true } }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dejected1 commented 5 years ago

that works. I just had a plex user sign in and create a account with organizr using the db backend. SSO for ombi worked for him. So what does that mean?

causefx commented 5 years ago

something in ombi isn’t allowing the return of the token. is admin listed in users as a Plex User?

Sent from my iPhone

On Dec 25, 2018, at 5:19 PM, dejected1 notifications@github.com wrote:

that works. I just had a plex user sign in and create a account with organizr using the db backend. SSO for ombi worked for him. So what does that mean?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dejected1 commented 5 years ago

yes, in organizr and ombi and plex the user id for admin is listed , its the same across all platforms. oath works for organizr and works for ombi, separately. if i use plex auth for organzir it works. but i have to do it again from the ombi interface to log into ombi. it works there too thou.

causefx commented 5 years ago

nothing in org process has changed at all... i just pass the token from plex to ombi. ombi then checks the token and if it is good to go then it will return an ombi token. so now that we know the process from a normal users works, it confirms that ombi is the reason for not returning a token. everything in organizr is configured correctly.

Sent from my iPhone

On Dec 26, 2018, at 11:31 AM, dejected1 notifications@github.com wrote:

yes, in organizr and ombi and plex the user id for admin is listed , its the same across all platforms. oath works for organizr and works for ombi, separately. if i use plex auth for organzir it works. but i have to do it again from the ombi interface to log into ombi. it works there too thou.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

kimsbrian commented 5 years ago

Does remote access have to be enabled and correctly configured? Someone in the Discord mentioned it but I don't really have a way to test that out. Is access from a custom access url not sufficient for logging on? I may be mistaken but I'd imagine Plex auth is with the account and not necessarily the server itself.

Lockszmith-GH commented 5 years ago

Had the same issue, which got me to here. Nothing here really helped me. Eventually I reset the Plex token and machine token in the SSO configuration which seems to do the trick.

hope this helps someone who will get here.

TristBella commented 5 years ago

I can not login using Plex SSO. I get the same error as the OP description. I can however login when on the machine where Organizr exists. When using NGINX reverse proxy (which is the outside world) login fails with the following error in log: "Plex Token Check Function - Error: cURL error 28: Resolving timed out after 10000 milliseconds [Execution Time: 11.08s | 11080.5ms]" I can connect directly to Plex from the outside NGINX domain (https://plex.domain.com) and from local ip domain (http://192.1.1.1:32400) on the hosting box.

Tried resetting the token, didn't work.