Plex 2FA support

Issue description:
2 issues:

  1. Yatse does not appear to support native plex 2FA login method as per Secure Your Account with Two-Factor Authentication | Plex Support

  2. I have 2FA enabled and can connect by appending auth code to password as per above BUT all my libraries are reported by Yatse as empty, I can see no movies, music etc

Logs:

https://drive.google.com/file/d/1cP9nq4XCoL7QOue8P6YW3eUiDO4LkOPz/view?usp=sharing

Screenshots:

Additional information:

Their global login system is 100% dependent on their server and brings a lot of burden to normal users. Until there’s no choice I won’t use that.

The second solution should work and if you can log then there’s something odd somewhere. Are you sure you entered the proper code and it did not expire after?

What happens if you remove the host and add it again?

Hello,

Yes it logged in fine, or at least passed the test that Yatse presented.

I will try removing it and adding it again.

Thanks.

OK,

Removed it and re-added it, still same issue.

New logs here https://drive.google.com/file/d/1rCjhawPfQzkFIadxqlF1AFmo8nWv_fS2/view?usp=sharing

Looking at Plex “Authorized Devices” I cannot see Yatse reported…

Regards

Makes no sense they changes something I’ll need to dig out :frowning:

And yes by using normal auth it’s just a normal device in the device list.

I can try disabling 2FA and testing, if that will help?

There’s no reason it does not work without 2FA as even if Plex is less used there’s still many users of it.

But yes would confirm there’s no other issue with the libraries permissions.

Just tested, it’s syncing up fine.

So definitely related to 2FA in some way.

Yes :slight_smile: But if there was a basic issue you should not be able to add the host in the first place. So there’s some changes somewhere in Plex as all those are not really documented :frowning:

Will take some times to repro and eventually fix and not really high priority

OK no worries , thanks.

So found time to do a quick test as the error was strange.
And it’s actually a small bug on my side after a refactor.

The token get during validation was not reused later leading to a new token generation, but with the 2FA code being already invalid it fails. You can probably already properly connect with current version by putting the 2FA code just after it’s renew and be real fast to save then connect to the host.

In all cases next version will better handle this.

Excellent, thanks for looking at this so quick👍