Commit Graph

57 Commits

Author SHA1 Message Date
fufesou
a84bad4639 refact(oidc): manually open the browser (#15706)
* refact(oidc): manually open the browser

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): allow copying OIDC authentication links

Signed-off-by: fufesou <linlong1266@gmail.com>

* Remove unused translation in ko.rs

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): better hint on browser didn't open

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): login handle exception

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): remove unused translations

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): login handle error

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): login in flight

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(translation): move "Continue" to the end of template.rs

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): var rename

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): remove useless "open sign-in page"

Signed-off-by: fufesou <linlong1266@gmail.com>

* Remove unecessary translation contents

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): better way to show&expand the url

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact(oidc): better login ui

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(oidc): discard stale auth results after cancellation

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(oidc): handle auth status query failures safely

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(oidc): prevent concurrent login operations

- reuse the active login dialog and block duplicate password submissions
- cancel only active OIDC operations when closing the dialog
- preserve authentication state until failure cancellation succeeds

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(oidc): refine login options error feedback

Preserve typed errors to hide the network tip for
HTTP failures and clarify the login-options API contract.

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-08-04 12:35:04 +08:00
RustDesk
ffe20bb297 Login options error feedback (#15727)
* fix(flutter): show error and retry when fetching login options fails

The third-party login section of the login dialog was silently hidden
whenever /api/login-options could not be fetched (e.g. TLS handshake
aborted by a router/ISP scam filter, discussion #15700), leaving users
staring at a dialog with no feedback. The pure-Dart HTTP path also had
no timeout, so a black-holed connection could hang indefinitely.

- let transport errors propagate from queryOidcLoginOptions instead of
  swallowing them; a non-JSON response still means "no third-party
  login" so self-hosted servers without this API keep the old behavior
- show network_error_tip, a Retry button, and the underlying error in
  the login dialog so users and supporters can see what failed
- bound the Dart HTTP branch with a 15s timeout; the Rust branch keeps
  its own bounded per-attempt timeouts and is awaited to completion so
  a retry never races the URL-keyed ASYNC_HTTP_STATUS entry of an
  abandoned in-flight request

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(flutter): surface currentUser refresh failures that were only logged

Non-transport failures of the token auto-login (/api/currentUser) -- a
bad HTTP status, a filter's HTML block page, or an error field in the
body -- were only debugPrinted, so the address book / group tabs showed
nothing and offered no retry. Reuse the existing networkError channel
so netWorkErrorWidget shows the error with its Retry button.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(flutter): keep retry row visible with progress while refetching login options

Review follow-ups: clicking Retry used to clear the error and hide the
row with no pending feedback, which could read as a dead click while
the Rust fallback chain runs; keep the row, disable the button, and
show the usual LinearProgressIndicator instead. Also raise the Dart
HTTP branch timeout to 30s so large web address book pulls on slow
links do not newly time out; it still bounds the previously unbounded
hang and stays above the Rust side's 12s per-attempt timeout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: update webpki-roots to latest Mozilla root store

0.26.9 -> 0.26.11 (now a forwarding shim over 1.x, used by tungstenite)
1.0.4 -> 1.0.9 (used by reqwest / hyper-rustls / hbb_common)

The 0.26.9 line carried its own root snapshot frozen in early 2025, so
the websocket TLS path was building against a stale bundle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: weekly workflow to PR webpki-roots root store updates

webpki-roots is a transitive dependency, so dependabot's cargo version
updates would not cover it. A scheduled job runs cargo update for every
webpki-roots instance in each lockfile and opens a PR when the pinned
Mozilla root snapshot is behind, keeping root store changes reviewable
instead of baking them silently into release builds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(flutter): hide network tip for server-reported currentUser errors

Review follow-up: when /api/currentUser fails with an error the server
itself reported (an error field in a JSON body, or an unexpected
schema), "Please check your network connection" was misleading. Track
whether the surfaced error came from a server response and skip the
network tip for those; FormatException (a non-JSON body such as a
filter's block page) keeps it, since that still indicates a network or
middlebox problem.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(flutter): close timed-out HTTP clients

* fix(flutter): flag server-reported errors at the throw site

Review follow-up (CodeRabbit). Classifying by `e is! FormatException`
mislabeled ambiguous failures: a middlebox block page returning 200
with valid-but-wrong-shape JSON throws a TypeError from fromJson and
was shown without the check-your-network tip, though it is a network
artifact. Set networkErrorFromServer only at the one site that is
certainly server-reported (an error field in the body); every other
failure keeps the network tip plus the raw error text.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: serialize webpki-roots update runs, null-delimit lockfile paths

Review follow-up (CodeRabbit). A manual dispatch overlapping the weekly
cron could have an older run force-push over the newer branch state;
queue runs via a concurrency group without cancel-in-progress. Also
iterate lockfiles with git ls-files -z so a path with spaces cannot be
word-split, and keep the loop failing the step on any cargo error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(flutter): improve login retry feedback

Use the theme primary color for the Retry button and hide stale
error messages while a retry is in progress.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(flutter): surface login option response errors

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: fufesou <linlong1266@gmail.com>
2026-08-04 10:19:53 +08:00
fufesou
93d064a9b0 refact(oidc): icon azure to microsoft (#15278)
* refact(oidc): icon azure to microsoft

Signed-off-by: fufesou <linlong1266@gmail.com>

* Simple refactor

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: oidc, remove unused auth-azure.svg

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-06-17 14:36:53 +08:00
rustdesk
91de51290d add microsoft oidc logo 2026-04-15 14:39:46 +08:00
rustdesk
68fa0466c8 improved oidc login error 2026-04-15 14:36:03 +08:00
fufesou
626a091f55 fix(translation): OIDC, Continue with (#14271)
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-02-06 14:18:48 +08:00
fufesou
910dcf2036 refact: tls, native-tls fallback rustls-tls (#13263)
Signed-off-by: fufesou <linlong1266@gmail.com>
2025-11-03 23:21:01 +08:00
fufesou
a73fa3cbf6 refact: oidc, launch url (#11772)
Signed-off-by: fufesou <linlong1266@gmail.com>
2025-05-15 09:06:37 +08:00
fufesou
b525185d7f feat: web oidc (#11755)
Signed-off-by: fufesou <linlong1266@gmail.com>
2025-05-14 17:35:50 +08:00
fufesou
9114743577 fix: linux, flutter, workaround freeze (#10324)
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-12-20 09:24:08 +08:00
dignow
b967d496cc refact: init values from initState to Constractor (#8817)
* refact: init values from initState to Constractor

Signed-off-by: dignow <linlong1265@gmail.com>

* fix: move RxBool init into Constructor

Signed-off-by: dignow <linlong1265@gmail.com>

* peer sort option

Signed-off-by: dignow <linlong1265@gmail.com>

* Remove empty initState()

Signed-off-by: dignow <linlong1265@gmail.com>

---------

Signed-off-by: dignow <linlong1265@gmail.com>
2024-07-25 10:45:51 +08:00
21pages
5b52742cf7 fix mobile ab/group not update when login with 2fa/email (#8378)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-17 10:35:57 +08:00
fufesou
a42df9a27b Refact, verification login with secret (#6943)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-01-22 11:14:28 +08:00
fufesou
06b3894249 Refact/verification code input check (#6924)
* Refact, login verification code, input check

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Refact, settings, enable 2fa, dialog input

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Refact. Connect, 2fa code, input check

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* refact, 2Fa text field, input formatter, only digits

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* refact, error message

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-01-20 15:36:32 +08:00
fufesou
159c883bf3 verification code, auto submit (#6822)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-01-07 21:07:25 +08:00
fufesou
19d43b3f62 login on 'Enter' (#6819)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-01-06 21:51:05 +08:00
fufesou
7e3a0c4ded Better 2fa verification support (#6782)
* Better 2fa verification support

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* 2FA login verification, add request filed 'tfa_code'

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* 2fa dialog

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* msgbox, title

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Feat, oidc login, 2fa

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-01-03 16:43:39 +08:00
21pages
26cebd2aeb request focus again when android account password obtain focus (#6744)
Signed-off-by: 21pages <pages21@163.com>
2023-12-24 16:16:47 +08:00
dignow
7f7d5d9f4c oidc, add default gitlab icon
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-22 21:52:23 +08:00
21pages
979203cbdb replace offstage with if-else for LinearProgressIndicator in dialog
Signed-off-by: 21pages <pages21@163.com>
2023-08-18 16:16:21 +08:00
dignow
35c1cee18b common oidc, add auth0
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-07 17:25:46 +08:00
dignow
0bf007e63c common oidc, debug
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-07 17:25:46 +08:00
dignow
3f3c45b663 common oidc, tmp commit
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-07 17:25:46 +08:00
dignow
dab956fe85 common oidc
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-07 17:25:46 +08:00
21pages
ebd8903c9b logout confirm
Signed-off-by: 21pages <pages21@163.com>
2023-07-15 07:21:54 +08:00
dignow
4707e0ed2e revert desktop login dialog
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-05 16:15:39 +08:00
dignow
a3024fdd14 trivial change
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-05 15:48:30 +08:00
dignow
92a4d88532 dismiss login dialog before verification
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-05 14:53:29 +08:00
dignow
06638337bf refact close inkwell on login dialog
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-01 16:28:46 +08:00
dignow
b5bd628488 apply current theme mode
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-01 15:06:56 +08:00
dignow
588168f638 replace close button to inkwell
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-01 14:43:00 +08:00
dignow
fe7bbdee2b login dialog, add button style for close button
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-01 13:57:29 +08:00
dignow
63533480dc refact login dialog
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-01 12:54:19 +08:00
dignow
a10433e2e0 Immediately show the login dialog
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-01 10:19:59 +08:00
rustdesk
5831db260f fix login error 2023-06-22 22:33:54 +08:00
rustdesk
ac8fc71b3b autoLogin and trustThisDevice are two different things 2023-06-22 22:11:35 +08:00
fufesou
8dd218235d store user info after login
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-22 00:55:50 +08:00
fufesou
321f193f4d fix address book state
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-21 18:28:52 +08:00
fufesou
2d0a2d6436 trivial change
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-21 16:47:01 +08:00
fufesou
bf1cf29cb9 fix user login state
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-21 16:37:27 +08:00
21pages
148534540b rename autoLogin to trustThisDevice
Signed-off-by: 21pages <pages21@163.com>
2023-06-20 07:54:34 +08:00
fufesou
5a88841ffd oidc buttons, depends on server options
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-14 15:17:20 +08:00
fufesou
b27ae877d3 oidc, login , launch url with external application
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-12 21:25:59 +08:00
fufesou
a8b1e3ff7e fix login
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-04 14:29:00 +08:00
fufesou
f952c32c90 remove auto login checkbox
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-05-31 17:17:45 +08:00
fufesou
c28387c8c6 fix oidc login
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-05-30 15:32:19 +08:00
Kingtous
77fa807b57 feat: implement dialog callback 2023-05-08 12:34:19 +08:00
fufesou
8ebfd3f628 refactor dialog
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-03-24 15:21:14 +08:00
grummbeer
f2ec6ff12a Unify Input. Remove hardcoded style (login) 2023-03-18 04:48:56 +01:00
grummbeer
891121c64d Unify input labels. Remove colon from login labels 2023-02-16 11:05:07 +01:00