fogpuppy 1 Posted June 28, 2020 Share Posted June 28, 2020 Hi all, I want to automate the login of a "guest" user for my application. I have a nginx web server proxy front end so it can get/post to the emby web server to facilitate this. Basically my application is going to use Emby to stream media to tablets, phones and laptops via a web browser. However, I really want to streamline the entire process so I cant be asking them to login, etc. I looking at the log there are two URLs that look promising. The most important one is probably http://localhost:8096/emby/Users/authenticatebyname which does the actual login. I assume if I could pass this the right values it would work. I know the name of the user ("Guest") and it has no password. Any help someone could provide would be greatly appreciated. I also saw another URLhttp://localhost:8096/emby/users/public that might be helpful. It returns results like: [{"Name":"Guest","ServerId":"e980d705c40e4165a2c2d52db1eaf4b3","Id":"b33906dee93c4bd18eed059c34ea069c", "HasPassword":false,"HasConfiguredPassword":false,"HasConfiguredEasyPassword":false,"LastLoginDate":"2020-06-28T13:55:35.0120320+00:00", "LastActivityDate":"2020-06-28T13:55:40.1153600+00:00","Configuration":{"PlayDefaultAudioTrack":true,"DisplayMissingEpisodes":false, "GroupedFolders":[],"SubtitleMode":"Default","DisplayCollectionsView":false,"EnableLocalPassword":false,"OrderedViews":[], "LatestItemsExcludes":[],"MyMediaExcludes":[],"HidePlayedInLatest":true,"RememberAudioSelections":true,"RememberSubtitleSelections":true, "EnableNextEpisodeAutoPlay":true},"Policy":{"IsAdministrator":false,"IsHidden":false,"IsHiddenRemotely":true,"IsDisabled":false, "BlockedTags":[],"IsTagBlockingModeInclusive":false,"EnableUserPreferenceAccess":true,"AccessSchedules":[],"BlockUnratedItems":[], "EnableRemoteControlOfOtherUsers":false,"EnableSharedDeviceControl":true,"EnableRemoteAccess":true, "EnableLiveTvManagement":false,"EnableLiveTvAccess":false,"EnableMediaPlayback":true,"EnableAudioPlaybackTranscoding":true, "EnableVideoPlaybackTranscoding":true,"EnablePlaybackRemuxing":true,"EnableContentDeletion":false,"EnableContentDeletionFromFolders":[], "EnableContentDownloading":true,"EnableSubtitleDownloading":false,"EnableSubtitleManagement":false,"EnableSyncTranscoding":true, "EnableMediaConversion":true,"EnabledDevices":[],"EnableAllDevices":true,"EnabledChannels":[],"EnableAllChannels":true,"EnabledFolders":[], "EnableAllFolders":true,"InvalidLoginAttemptCount":0,"EnablePublicSharing":true,"RemoteClientBitrateLimit":0, "AuthenticationProviderId":"Emby.Server.Implementations.Library.DefaultAuthenticationProvider","ExcludedSubFolders":[], "DisablePremiumFeatures":false,"SimultaneousStreamLimit":0}}] Link to comment Share on other sites More sharing options...
Luke 37049 Posted June 28, 2020 Share Posted June 28, 2020 You may want to check out the Organizr or Ombi apps. They may have features to link into the Emby web app, so you can see how they're doing it. But again I'm not positive about it and it's not something we're actively testing ourselves. Link to comment Share on other sites More sharing options...
fogpuppy 1 Posted June 30, 2020 Author Share Posted June 30, 2020 ok great hints. By looking at both Ombi and some other posts on this site I can now successfully call the API to authenticate my guest user. The problem if how to get it to then go to the home page after that user ... I'm assuming I probably need to just set teh user ID and/or Server ID in some headers or pass them as parameters and do a redirect but .... any help anyone? Link to comment Share on other sites More sharing options...
Luke 37049 Posted July 1, 2020 Share Posted July 1, 2020 6 hours ago, fogpuppy said: ok great hints. By looking at both Ombi and some other posts on this site I can now successfully call the API to authenticate my guest user. The problem if how to get it to then go to the home page after that user ... I'm assuming I probably need to just set teh user ID and/or Server ID in some headers or pass them as parameters and do a redirect but .... any help anyone? We don't have an official way of doing this, but i wouldn't be surprised if you're able to find some other community hack for it. Link to comment Share on other sites More sharing options...
dwi 0 Posted May 18, 2021 Share Posted May 18, 2021 On 6/30/2020 at 10:46 PM, fogpuppy said: ok great hints. By looking at both Ombi and some other posts on this site I can now successfully call the API to authenticate my guest user. The problem if how to get it to then go to the home page after that user ... I'm assuming I probably need to just set teh user ID and/or Server ID in some headers or pass them as parameters and do a redirect but .... any help anyone? Hi @fogpuppy, can you share me your solution? I tried to do something with the API, but I don't get it. I get the Access Token, but i am not able to use this to start a logged in session. My goal is to SSO my Azure User who has no password with the REMOTE USER name of apache and some php and javascript. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now