[PR #2752] [CLOSED] fix: return valid AuthUrl in followup request on expired reg id #2836

Closed
opened 2025-12-29 04:19:15 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2752
Author: @bobelev
Created: 8/29/2025
Status: Closed

Base: mainHead: bblv/auth-followup


📝 Commits (2)

  • 2174f6d chore: make reg cache expiry tunable
  • 75217c4 fix: return valid AuthUrl in followup request on expired reg id

📊 Changes

6 files changed (+183 additions, -9 deletions)

View changed files

📝 hscontrol/app.go (+1 -0)
📝 hscontrol/auth.go (+38 -5)
📝 hscontrol/oidc.go (+13 -2)
📝 hscontrol/state/state.go (+22 -2)
📝 hscontrol/types/config.go (+4 -0)
📝 integration/auth_oidc_test.go (+105 -0)

📄 Description

  • chore: make reg cache expiry tunable
  • fix: return valid AuthUrl in followup request on expired reg id
  • have read the CONTRIBUTING.md file
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

Info:

  • tailscale client gets a new AuthUrl and sets entry in the regcache
  • regcache entry expires
  • client doesn't know about that
  • client always polls followup request а gets error

When user clicks "Login" in the app (after cache expiry), they visit
invalid URL and get "node not found in registration cache". Some clients
on Windows for e.g. can't get a new AuthUrl without restart the app.

To fix that we can issue a new reg id and return user a new valid
AuthUrl.


🔄 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/2752 **Author:** [@bobelev](https://github.com/bobelev) **Created:** 8/29/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `bblv/auth-followup` --- ### 📝 Commits (2) - [`2174f6d`](https://github.com/juanfont/headscale/commit/2174f6d0b982a4b7787b86319f236d8eeb9b923b) chore: make reg cache expiry tunable - [`75217c4`](https://github.com/juanfont/headscale/commit/75217c4579a6915b5ad7ada1b47c8160b2f3d561) fix: return valid AuthUrl in followup request on expired reg id ### 📊 Changes **6 files changed** (+183 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/app.go` (+1 -0) 📝 `hscontrol/auth.go` (+38 -5) 📝 `hscontrol/oidc.go` (+13 -2) 📝 `hscontrol/state/state.go` (+22 -2) 📝 `hscontrol/types/config.go` (+4 -0) 📝 `integration/auth_oidc_test.go` (+105 -0) </details> ### 📄 Description - **chore: make reg cache expiry tunable** - **fix: return valid AuthUrl in followup request on expired reg id** <!-- … --> - [x] have read the [CONTRIBUTING.md](./CONTRIBUTING.md) file - [ ] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [x] added integration tests - [ ] updated documentation if needed - [ ] updated CHANGELOG.md Info: - tailscale client gets a new AuthUrl and sets entry in the regcache - regcache entry expires - client doesn't know about that - client always polls followup request а gets error When user clicks "Login" in the app (after cache expiry), they visit invalid URL and get "node not found in registration cache". Some clients on Windows for e.g. can't get a new AuthUrl without restart the app. To fix that we can issue a new reg id and return user a new valid AuthUrl. --- <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 04:19:15 +01:00
adam closed this issue 2025-12-29 04:19:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2836