probablyraging / steam-game-idler

An automatic Steam trading card farmer and achievement unlocker, with a modern UI
GNU General Public License v3.0
43 stars 7 forks source link

WebUI with 2fa is a bit wonky #7

Closed Slaurits closed 5 months ago

Slaurits commented 5 months ago

Describe the issue

when you login to the web ui and then try to start idling, the terminal asks for 2fa code, and when you finally input it, then you have to go back to the web ui and choose the same games again and press idle once again, then it works. video of problem

Which branch of SGI?

CLI + WebUI

What version of SGI are you using?

Latest version

probablyraging commented 5 months ago

Yes, I mentioned this is my reply to your other issue, you can read that reply here https://github.com/probablyraging/steam-game-idler/issues/3#issuecomment-2149646861

if you don't see the started idling [game name] message after entering your code you will need to stop and start idling your game(s) again

This is going to be unavoidable unfortunately. The only thing I can suggest if this annoys you is to disable Steam Guard, which I wouldn't recommend lol

Slaurits commented 5 months ago

oh sorry about that, I must've misinterpreted it, but isn't it possible to sync the terminal with the webui, so when you login it logs in to the terminal aswell?

Slaurits commented 5 months ago

Also the idler I used before had a cool feature to use a QR code, could you possibly implement that?

Repo

probablyraging commented 5 months ago

oh sorry about that, I must've misinterpreted it, but isn't it possible to sync the terminal with the webui, so when you login it logs in to the terminal aswell?

Unfortunately not as the frontend (web ui) and backend (terminal) require a seperate Steam session and for the most part do not really have a way of communicating with each other, and the library I am using to handle Steam sessions doesn't work in the browser, making the backend necessary.

I briefly tested attempting to login to both front/backend sessions at the same time using the same Steam Guard code but unfortunately once a code is used it can't be used again, requiring the user to enter a new code for both sessions.

To clarify this further incase you are still confused;

then you have to go back to the web ui and choose the same games again and press idle once again

So this issue should only ever happen once per session, though I can look in to this a bit further and see if there is some way of preventing this from happening as I am sure it will be annoying to deal with. Leave it with me for now and when I get some spare time over the weekend I'll take a look. If I can improve this issues I will reply here, no guarantees but lol

For someone who doesn't have 2FA enabled, this would never be an issue as your credentials are stored so you are automatically logged in between sessions and never interact with the terminal.

Also the idler I used before had a cool feature to use a QR code, could you possibly implement that?

Honestly, probably not, not at the moment anyway as again this seems like more hassle than it's worth for what SGI does. As mentioned previously, you should only ever need to to physically log in to SGI once unless you manually log yourself out.

I've also found QR codes in the terminal (which is where you would mainly need to scan it in this case) to be hit and miss in terms of clean/dirty/broken QR codes. Running SGI on different OS's using different terminals such as command prompt, powershell, linux terminal, etc.. each can display QR codes vastly different from one other and what might work on one platform might not work great on another, leading to more issues in the long run. I think a basic username/password approach is a clean solution for cross-platform use and for what SGI is and does.

Slaurits commented 5 months ago

Alright, thanks for explaining it so I could understand fully.