Skip to content

fix: redirect user to the login screen after log out from a deployment #65

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
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixed

- after log out, user is redirected back to the initial log in screen

## 0.1.1 - 2025-04-03

### Fixed
Expand Down
6 changes: 5 additions & 1 deletion src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ class CoderRemoteProvider(
override fun getAccountDropDown(): DropDownMenu? {
val username = client?.me?.username
if (username != null) {
return dropDownFactory(context.i18n.pnotr(username), { logout() })
return dropDownFactory(context.i18n.pnotr(username)) {
logout()
context.ui.showUiPage(getOverrideUiPage()!!)
}
}
return null
}
Expand All @@ -211,6 +214,7 @@ class CoderRemoteProvider(
lastEnvironments.clear()
environments.value = LoadableState.Value(emptyList())
isInitialized.update { false }
client = null
}

override val svgIcon: SvgIcon =
Expand Down
Loading