[Bug] PR #2474 can cause duplicate users #1017

Closed
opened 2025-12-29 02:27:32 +01:00 by adam · 0 comments
Owner

Originally created by @lordwelch on GitHub (May 10, 2025).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Re-authenticating via OIDC created a duplicate user

Expected Behavior

Re-Authenticating via OIDC authenticates to the same existing user

Steps To Reproduce

  1. Authenticate to headscale using OIDC
  2. Note that the provider_identifier field in the database has a double slash
  3. Upgrade to 0.26.0-beta.1
  4. Re-authenticate via the same OIDC account
  5. A duplicate account is created, with the only difference being the original account has a duplicate slash // the new account has a single slash /

Environment

- OS: Fedora CoreOS 42
- Headscale version: 0.26.0-beta.1
- Tailscale version: 1.82.5

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Debug information

PR #2474 changed the provider_identifier to be a properly joined url. This can cause duplicate users that are identical except for a duplicate /

Originally created by @lordwelch on GitHub (May 10, 2025). ### Is this a support request? - [x] This is not a support request ### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior Re-authenticating via OIDC created a duplicate user ### Expected Behavior Re-Authenticating via OIDC authenticates to the same existing user ### Steps To Reproduce 1. Authenticate to headscale using OIDC 2. Note that the `provider_identifier` field in the database has a double slash 3. Upgrade to 0.26.0-beta.1 4. Re-authenticate via the same OIDC account 5. A duplicate account is created, with the only difference being the original account has a duplicate slash `//` the new account has a single slash `/` ### Environment ```markdown - OS: Fedora CoreOS 42 - Headscale version: 0.26.0-beta.1 - Tailscale version: 1.82.5 ``` ### Runtime environment - [x] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ### Debug information PR #2474 changed the provider_identifier to be a properly joined url. This can cause duplicate users that are identical except for a duplicate `/`
adam added the bug label 2025-12-29 02:27:32 +01:00
adam closed this issue 2025-12-29 02:27:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1017