MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.21k stars 811 forks source link

API endpoint /Users #3553

Open causefx opened 5 years ago

causefx commented 5 years ago

For some reason ConnectUserId is no longer being reported on this endpoint:

Example date returned:

    "Name": "causefx",
    "ServerId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "ConnectUserName": "causefx",
    "ConnectLinkType": "LinkedUser",
    "Id": "LocalIDHERE",
    "HasPassword": true,
    "HasConfiguredPassword": true,
    "HasConfiguredEasyPassword": true,
    "LastLoginDate": "2019-05-09T22:05:26.9870807+00:00",
    "LastActivityDate": "2019-05-09T22:05:33.3143329+00:00",

From API Docs:

    "Name": "string",
    "ServerId": "string",
    "ServerName": "string",
    "ConnectUserName": "string",
    "ConnectUserId": "string",
    "ConnectLinkType": "LinkedUser",
    "Id": "string",
    "PrimaryImageTag": "string",
    "HasPassword": true,
    "HasConfiguredPassword": true,
    "HasConfiguredEasyPassword": true,
    "EnableAutoLogin": true,
    "LastLoginDate": "2019-05-09T20:03:15.930Z",
    "LastActivityDate": "2019-05-09T20:03:15.930Z",
LukePulverenti commented 5 years ago

Hi, what would you need this for? This was removed due to it not being utilized by any of our apps.

causefx commented 5 years ago

It’s for allowing use of authenticating Emby user accounts with Emby Connect accounts locally.

Our app Organizr allows logging in locally via emby local Api or emby connect api...

we query that endpoint to tie it together with the data we get from Emby connect Api.

Sent from my iPhone

On May 9, 2019, at 6:06 PM, Luke notifications@github.com wrote:

Hi, what would you need this for? This was removed due to it not being utilized by any of our apps.

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

Fma965 commented 5 years ago

@LukePulverenti I guess this isn't going to be re-added then? surely the point of an API is for external applications to use, if things are removed from the API without documentation stating this then a API is pointless?

cactushydrocodone commented 5 years ago

@LukePulverenti I guess this isn't going to be re-added then? surely the point of an API is for external applications to use, if things are removed from the API without documentation stating this then a API is pointless?

Emby doesnt support third party applications, the API is for their own Apps to communicate with the server.

Fma965 commented 5 years ago

OK, i mean your API documentation is public but the API isn't for the public.

softworkz commented 5 years ago

This is not true - just the opposite. We've taken great effort to properly document our API (https://github.com/MediaBrowser/Emby/wiki) and just recently we even added OpenAPI documentation (http://swagger.emby.media/?staticview=true) allowing interactive tryout. (not with the static version above, though)

What we don't do is API versioning. Unlike static websites we cannot afford to keep multiple compatibility API version layers as we're advancing quickly and this requires frequent changes to certain parts of the API. Basic things are meant to remain compatible, though.

But as a consequence for consumers of the API, this means that it is inevitable to always perform a version check first (/System/Info/Public) and proceed only when the target server's version is verified to work with your application.

causefx commented 5 years ago

I totally understand that. So, is there any possibility of adding this back in? If not, I’m cool with disabling this portion of my app....

softworkz commented 5 years ago

The primary goal of EmbyConnect is enabling users to find "their" servers when they don't have a static IP. In case of your app, once a user is there, there's no more need for that anyway, I believe.

All I can say at this time is that you're making no mistake by disabling this login method..

causefx commented 5 years ago

As far as my app goes, it just creates an SSO using EmbyConnect accts as the backend.

So “Admins” can use emby kind of like LDAP. allowing users to manage their own passwords etc....

Sent from my iPhone

On May 13, 2019, at 4:18 PM, softworkz notifications@github.com wrote:

The primary goal of EmbyConnect is enabling users to find "their" servers when they don't have a static IP. In case of your app, there's no more need for that anyway, I believe.

All I can say at this time is that you're making no mistake by disabling this login method..

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

softworkz commented 5 years ago

I'm not sure if I understood that correctly. I hope your app is not creating EmbyConnect accounts in an automated way... For administrative tasks you might better use API Key authentication in case you aren't doing so already.

With regards to user accounts, I would recommend focusing on Emby local accounts (or use Emby's LDAP support if your app is implementing an LDAP server).

causefx commented 5 years ago

No, no account creation at all. Say you the Admin has your Emby instance up. You add me as a user and tie my embyConnect acct to it.

You can now setup my app and I can now login into my app using my EmbyConnect acct.

Sent from my iPhone

On May 13, 2019, at 4:36 PM, softworkz notifications@github.com wrote:

I'm not sure if I understood that correctly. I hope your app is not creating EmbyConnect accounts in an automated way... For administrative tasks you might better use API Key authentication in case you aren't doing so already.

With regards to user accounts, I would recommend focusing on Emby local accounts (or use Emby's LDAP support if your app is implementing an LDAP server).

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

softworkz commented 5 years ago

Do you need to enter your EmbyConnect password in your app, then?

causefx commented 5 years ago

Yes, you are presented with a login screen and the app authenticates using:

https://connect.emby.media/service/user/authenticate
softworkz commented 5 years ago

Ah, yes of course, that's the way it is done there. Apologies, I mixed this up with something else.

I think, with native authentication, the process would be just slightly different:

I - as the Admin - would add you as a new user with a random password and inform you about the credentials, asking you to change the password on first login.

causefx commented 5 years ago

Correct, I supported both methods. Emby Local and EmbyConnect. Nevertheless, I will post a note about this so Users will know what happened. If Emby does bring back this field (not sure why they wouldn't as I thought it was beneficial) I can easily re-enable it.

If Emby does bring this back, Can someone please post on this thread?

Tuumke commented 5 years ago

Is the Emby local login still working? Can't seem to get this to work..

Fma965 commented 5 years ago

Yes it does, well it's working in organizr atleast

schmittyd commented 5 years ago

OK, i mean your API documentation is public but the API isn't for the public.

A lot of things the Emby team have done in the last year or two don't make sense, and seem very short-sighted. A once great open source project has become a commercial mess... un-uniform playback apps, restricting or removing of API endpoints without any communication, lack of up to date documentation in some respects, no apt and snap support on Linux.

LukePulverenti commented 5 years ago

Actually the reason for the change here is all based on community feedback. We just don't have more information at this point because we aren't ready to announce anything just yet.

But the loud and clear feedback you've gotten is you want less reliance on cloud accounts and more privatized and personal Emby Server. So that is exactly what we are doing, which is gradually scaling back Emby Connect, and moving more towards having everything self-managed within each Emby Server.

LukePulverenti commented 5 years ago

If you guys could just hang tight for a little longer on this, we are working on something we think will be better and will not require the Emby Connect login. This will a) eliminate confusion between by the two login methods (local vs Emby Connect), and b) allow it to be self-managed within your Emby Server. All while still solving the original goal of Emby Connect, which is enabling easy remote connections without having to remember your server IP address. We are just trying to avoid announcing too early before it's actually ready, and that is the reason why we need a little bit of time on this. Thanks.

causefx commented 5 years ago

Hmmmm.... I'm interested in what will be announced. Thanks.

Fma965 commented 5 years ago

@LukePulverenti thanks for the update, glad to see you are taking feedback from the community and making changes to make the experience better. cloud authentication is always a issue if the authentication server goes down.

angrycuban13 commented 4 years ago

Hi,

Is there a new update on this?

pXius commented 4 years ago

Also interested. The change in API access made it tedious to set up a new user with the Ombi/Emby/Organizr Combo.

cj2tech commented 4 years ago

Also interested. And would like to see this come back

cj2tech commented 4 years ago

@LukePulverenti Any word on this since a year ago? Or is this kinda just dead and will stay eol?

cameronurnes commented 4 years ago

I poked at the Ombi dev a little in his Discord, and now he has fixed his end for Ombi v4: https://github.com/tidusjar/Ombi/commit/bffa7d33d4113c2c873e9bc3a3e62b7ea61acce4

sgtcoder commented 6 months ago

Can we get an email address too for login? It makes it challenging to login with First Name/Last Name.