Steam-Chat-Bot / node-steam-chat-bot

Simplified interface for a steam chat bot
MIT License
101 stars 35 forks source link

Webui error: error while logging in on the browser #111

Closed Kurochi51 closed 8 years ago

Kurochi51 commented 8 years ago

Tried to get webui to work, but when i try to log in it redirects to steam authentication which returns an "Error" when I try to sign in.

So far I've tried to change admins: admins, to admins: steamid, where steamid was first mine then someone elses, then tried to remove it, but the "error" was still there.

Firstly i got connection refused with :6969 port, but when i changed to :8080 it started to work. Also in the code I've used localhost instead of ip, but I don't think that's a problem.

The config of mybot: http://pastebin.com/8hLSeVvy

Efreak commented 8 years ago

Um. You should revoke and regenerate your Steam Web API Key, you don't want that public.

I don't know very much about openid and how it works. Where is the error you see coming from? The console, steam's servers, or the browser? Are you running your browser on the same device as the bot?

The public url is the prefix for where you get redirected to by steam after you log into the bot. If you set the url to localhost, then that means the webui won't work on the public internet--it will only work when browsing from the computer that is actually running your bot.

For example, Miley runs at miley.efreakbnc.net, so the prefix is miley.efreakbnc.net/api; when you go to miley.efreakbnc.net/api/login, it redirects you to steam. After you log into steam successfully, steam redirects you to miley.efreakbnc.net/api/verify with a bunch of parameters, which get evaluated by the steam-login middleware, which then redirects you to miley.efreakbnc.net/api/client if the user is allowed.

Kurochi51 commented 8 years ago

The error is in browser, right under steam "sign in" button. The browser is indeed on the same device as the bot. Changed it to my ip, but it does the same. Also, this problem was present at 2 other people too, just that i gave them my ip instead of localhost.

Efreak commented 8 years ago

If you set the public IP to localhost, then it will not work on other devices regardless, as for them 'localhost' is their computer.

If you're saying that the error occurs on steam's website where you input your username and password, then that's nothing to do with the bot itself (there could be an issue with the openid authentication scheme, but that's working for me so I don't think so); your admins list is entirely irrelevant here--user filtering happens after the steam login; if you log in as an account that doesn't have access to the webUI, you get an error like this.

  1. You go to webui.
  2. webui sends you to steam.
  3. steam sends you back to webui with a URL that tells webui what your userid is.
  4. webui checks your userid that steam sent it to verify that you're allowed access.
    • if you're allowed access (ie, in the admins list), the bot sends the webui page to your browser
    • If you're not allowed access, you get shown something like this instead of the webui page.

Steam also shows this banner at the top of all openid authentications, as a notification that you're going to be going to an external website; you can verify this against ITAD, SteamGifts, or any other website that uses steam openid for login.

If this doesn't help you, perhaps you could tell me what the error steam shows you is? A screenshot would probably be useful.

Efreak commented 8 years ago

OK, there's been no more response on this in the past two weeks, so I'm gonna assume that it's solved.