rclone / rclone-webui-react

A full fledged UI for the rclone cloud sync tool
MIT License
1.26k stars 161 forks source link

Can't login without setting user and password #37

Open linsui opened 4 years ago

linsui commented 4 years ago

Windows10, Firefox

> rclone rcd --rc-web-gui -v
2019/10/19 22:56:15 NOTICE: Required files exist. Skipping download
2019/10/19 22:56:15 INFO  : Using default username: gui
2019/10/19 22:56:15 INFO  : No password specified. Using random password: ZeOEFulsbrmRjXfMYow_bw  
2019/10/19 22:56:15 INFO  : Using --user gui --pass XXXX as authenticated user
2019/10/19 22:56:15 NOTICE: Serving remote control on http://127.0.0.1:5572/

I can't login without inputing username and the random password. But if I run rclone rcd --rc-web-gui --rc-user <a username> --rc-pass <a password> I can login directly.

negative0 commented 4 years ago

There is a problem with the authentication scheme currently being used.

Animosity022 commented 4 years ago

Is there a plan to make a change for this? I would like to hide the GUI behind a proxy and I use the proxy for all my authentication so I bind just to localhost (it's for home use only anyway) and want to use no passwords for this.

nullredvector commented 4 years ago

i second @animosity22

Kuronoe-Ookami commented 3 years ago

I have the same problem, I can't log in to webgui because it asks for login and password, but none has been registered.

wxiaoguang commented 3 years ago

I can confirm that the problem is caused by wrong usage of authKey in local storage.

When you first run rclone rcd -vv --rc-web-gui, the generated random password is written into authKey.

BUT if you run rclone rcd -vv --rc-web-gui again, the authKey won't be updated with new generated random password, so you keep getting "401" error and have no chance to login.

The solution is delete the authKey in your browser manually.

eg: the authKey saved was: Z3VpOnR6cWF5eC04WnF5R1BOYVRIT3pCbHc= image

But rclone rcd wants: Z3VpOmhzeEFCOE5SRWJ0aTlzU1lhMzUyOFE=

2020/11/25 15:35:20 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "rcd" "-vv" "--rc-web-gui"]
2020/11/25 15:35:20 NOTICE: Web GUI exists. Update skipped.
2020/11/25 15:35:20 INFO  : No username specified. Using default username: gui
2020/11/25 15:35:20 INFO  : No password specified. Using random password: tzqayx-8ZqyGPNaTHOzBlw
2020/11/25 15:35:20 NOTICE: Serving Web GUI
2020/11/25 15:35:20 INFO  : Using --user gui --pass XXXX as authenticated user
2020/11/25 15:35:20 NOTICE: Serving remote control on http://127.0.0.1:5572/
2020/11/25 15:35:20 DEBUG : login_token "Z3VpOnR6cWF5eC04WnF5R1BOYVRIT3pCbHc="
2020/11/25 15:35:21 INFO  : /core/version: 127.0.0.1:64417: Unauthorized request from gui
2020/11/25 15:35:21 INFO  : /core/stats: 127.0.0.1:64418: Unauthorized request from gui
2020/11/25 15:35:21 INFO  : /core/stats: 127.0.0.1:64419: Unauthorized request from gui
2020/11/25 15:35:21 INFO  : /core/bwlimit: 127.0.0.1:64420: Unauthorized request from gui
2020/11/25 15:35:26 INFO  : /core/stats: 127.0.0.1:64429: Unauthorized request from gui
2020/11/25 15:35:26 INFO  : /core/stats: 127.0.0.1:64430: Unauthorized request from gui
wxiaoguang commented 3 years ago

It seems that the commit https://github.com/rclone/rclone-webui-react/commit/e7b5bc02e51019b84b7314b9d963607c5c948a4c fixed the bug, but hasn't been released yet.