Skip to content

chore: clear session on launch if vpn unconfigured #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Feb 24, 2025

Logging into Coder Desktop configures the system VPN with the session token & server URL.

However, uninstalling the app does not remove clear the UserDefault settings (namely hasSession), nor does it clear the keychain item (containing the session token). This means a fresh install of the app (that involves deleting the network extension from settings) starts in a broken state:
The VPN looks like it can be used, as typically the NE is configured once logged in, but the deleting of the network extension cleared the configuration. Right now we show an error that suggests logging out and back in.

This PR makes it not possible to enter this broken state. If a NE configuration cannot be loaded on start up of the app, the session is cleared, and the user will see they need to log in again.

As a drive-by fix, this PR also adds descriptions to all errors, as some varieties of errors would not display a description on the UI.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson marked this pull request as ready for review February 24, 2025 05:19
@ethanndickson ethanndickson merged commit 98c184d into main Feb 25, 2025
4 checks passed
@ThomasK33 ThomasK33 deleted the ethan/no-config-sign-out branch February 25, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants