ngovil21 / RequestChannel.bundle

Request Channel - A Plex Channel to create requests
158 stars 22 forks source link

[Feature Request] Auto-Register Plex.tv users #27

Closed jakeman2048 closed 8 years ago

jakeman2048 commented 8 years ago

I'm wondering if we could auto-register plex.tv users as their plex.tv username instead of having them register with user-inputted names.

I think I remember someone saying it was difficult to get the username of a user using a plugin, but I did some digging and I think I found a solution. Apparently if you pass the X-Plex-Token to https://plex.tv, it'll send back an XML with a "myPlexUsername" attribute.

It appears this won't work for the admin user, but it works for all remote plex.tv users.

Let me know if I could provide any more info.

ngovil21 commented 8 years ago

That would be ideal if I could use it, unfortunately the token we get is not the token used to log-in to plex.tv. The X-Plex-Token is a separate token that is specific to the Plex Media Server. It is only used to login to a Shared Plex Server. This is actually leveraged to check for admin users.

Currently the simplest solution is allowing the usewrs to register their own names.

I could also make the user authenticate with their Plex username and password in order to verify their actual name.

jakeman2048 commented 8 years ago

Yeah, that's what I tested. :)

The auth tokens only work on https://plex.tv/users/account

The shared access tokens only work on https://plex.tv

It also seems there's not an easy way to differentiate a home user vs a plex.tv user, by only looking at plex.tv with access tokens. Maybe there's some combination of things we'll have to do to determine this.