mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
5bc9fafab8
This PR changes how LocalBackend handles interactive (initiated via StartLoginInteractive) and non-interactive (e.g., due to key expiration) logins, and when it sends the authURL to the connected clients. Specifically, - When a user initiates an interactive login by clicking Log In in the GUI, the LocalAPI calls StartLoginInteractive. If an authURL is available and hasn't expired, we immediately send it to all connected clients, suggesting them to open that URL in a browser. Otherwise, we send a login request to the control plane and set a flag indicating that an interactive login is in progress. - When LocalBackend receives an authURL from the control plane, we check if it differs from the previous one and whether an interactive login is in progress. If either condition is true, we notify all connected clients with the new authURL and reset the interactive login flag. We reset the auth URL and flags upon a successful authentication, when a different user logs in and when switching Tailscale login profiles. Finally, we remove the redundant dedup logic added to WatchNotifications in #12096 and revert the tests to their original state to ensure that calling StartLoginInteractive always produces BrowseToURL notifications, either immediately or when the authURL is received from the control plane. Fixes #13296 Signed-off-by: Nick Khyl <nickk@tailscale.com> |
||
---|---|---|
.. | ||
testdata | ||
autoupdate_disabled.go | ||
autoupdate.go | ||
breaktcp_darwin.go | ||
breaktcp_linux.go | ||
c2n_pprof.go | ||
c2n_test.go | ||
c2n.go | ||
cert_js.go | ||
cert_test.go | ||
cert.go | ||
dnsconfig_test.go | ||
drive.go | ||
expiry_test.go | ||
expiry.go | ||
local_test.go | ||
local.go | ||
loglines_test.go | ||
network-lock_test.go | ||
network-lock.go | ||
peerapi_h2c.go | ||
peerapi_macios_ext.go | ||
peerapi_test.go | ||
peerapi.go | ||
profiles_notwindows.go | ||
profiles_test.go | ||
profiles_windows.go | ||
profiles.go | ||
serve_test.go | ||
serve.go | ||
ssh_stub.go | ||
ssh_test.go | ||
ssh.go | ||
state_test.go | ||
taildrop.go | ||
web_client_stub.go | ||
web_client.go |