[PR #1528] [CLOSED] Enhancement: Enable Account Switching for Non-Ephemeral Devices on Logout #2166

Closed
opened 2025-12-29 03:20:03 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1528
Author: @vsychov
Created: 8/15/2023
Status: Closed

Base: mainHead: fix-issue-1522


📝 Commits (1)

  • 6a8474f fix 1522: delete all machines after logout, not only ephemeral

📊 Changes

1 file changed (+7 additions, -10 deletions)

View changed files

📝 hscontrol/auth.go (+7 -10)

📄 Description

Hello! I find myself saying this in almost every PR or ticket, but I'd like to take a moment to thank you once again for this fantastic product. I truly hope to see it thrive and evolve over time.

This PR addresses a user story and resolves a bug. Fixes: #1522 and #1310.

User Story:
As a user, I want the ability to switch between accounts that I'm logged into, either via OIDC or through an auth-key.

Existing Issues:

  • When logging in via OIDC as User A, then logging out and trying to log in as User B, there's a web interface error stating could not register machine.
  • If you log in using the auth-key for User A, log out, and then try to authenticate with the auth-key for User B, the authentication seems to work. However, you remain logged in as User A.

These scenarios are works for non-ephemeral devices. Ephemeral devices don't face this problem as they get removed upon logout. While these issues might be addressed in #1492, it got me thinking: Why not always remove devices on logout? What value do they have post-logout?

Hence, I'm suggesting this as either a temporary or permanent fix for the aforementioned issues.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/1528 **Author:** [@vsychov](https://github.com/vsychov) **Created:** 8/15/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-issue-1522` --- ### 📝 Commits (1) - [`6a8474f`](https://github.com/juanfont/headscale/commit/6a8474f8f5a5d4a5c3843439309e600999d0ea46) fix 1522: delete all machines after logout, not only ephemeral ### 📊 Changes **1 file changed** (+7 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/auth.go` (+7 -10) </details> ### 📄 Description Hello! I find myself saying this in almost every PR or ticket, but I'd like to take a moment to thank you once again for this fantastic product. I truly hope to see it thrive and evolve over time. This PR addresses a user story and resolves a bug. Fixes: #1522 and #1310. **User Story:** As a user, I want the ability to switch between accounts that I'm logged into, either via OIDC or through an auth-key. **Existing Issues:** - When logging in via OIDC as User A, then logging out and trying to log in as User B, there's a web interface error stating `could not register machine`. - If you log in using the auth-key for User A, log out, and then try to authenticate with the auth-key for User B, the authentication seems to work. However, you remain logged in as User A. These scenarios are works for non-ephemeral devices. Ephemeral devices don't face this problem as they get removed upon logout. While these issues might be addressed in #1492, it got me thinking: Why not always remove devices on logout? What value do they have post-logout? Hence, I'm suggesting this as either a temporary or permanent fix for the aforementioned issues. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:20:03 +01:00
adam closed this issue 2025-12-29 03:20:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2166