From d7f3649eba6e2a6475e5b96b9fff51e414ca47f1 Mon Sep 17 00:00:00 2001 From: Zephyruso <127948745+Zephyruso@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:51:29 +0800 Subject: [PATCH] fix: auto login --- src/pages/Setup.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/Setup.tsx b/src/pages/Setup.tsx index 82e243c..daff52f 100644 --- a/src/pages/Setup.tsx +++ b/src/pages/Setup.tsx @@ -103,6 +103,15 @@ export default () => { }`, secret: query.get('secret') ?? '', }) + } else if (endpointList().length === 0) { + /** + we only try auto login when there is nothing in endpoint list + or user who is using config wont be able to switch to another endpoint ever + */ + void onSubmit({ + url: 'http://127.0.0.1:9090', + secret: '', + }) } })