[Bug] creating or updating user: constraint failed: UNIQUE constraint failed: users.name #966

Closed
opened 2025-12-29 02:26:47 +01:00 by adam · 1 comment
Owner

Originally created by @sergiofteixeira on GitHub (Mar 5, 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

when adding a new oidc user i get this issue, has anyone ever gotten it? this user does not exist in my db.

creating or updating user: constraint failed: UNIQUE constraint failed: users.name (2067)

Expected Behavior

to create the user normally

Steps To Reproduce

user with oidc in 25.1

  oidc = {
    only_start_if_oidc_is_available = true;
    map_legacy_users = true;
    allowed_domains = [
      "test.org"
    ];
    extra_params = {
      domain_hint = "test.org";
    };
    issuer = "https://login.test.org";
    scope = [
      "groups"
      "email"
      "openid"
    ];
    strip_email_domain = true;
    client_secret_path = "";
    client_id = "";
  };

Environment

- OS:
- Headscale version:
- Tailscale version:

Runtime environment

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

Anything else?

No response

Originally created by @sergiofteixeira on GitHub (Mar 5, 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 when adding a new oidc user i get this issue, has anyone ever gotten it? this user does not exist in my db. creating or updating user: constraint failed: UNIQUE constraint failed: users.name (2067) ### Expected Behavior to create the user normally ### Steps To Reproduce user with oidc in 25.1 oidc = { only_start_if_oidc_is_available = true; map_legacy_users = true; allowed_domains = [ "test.org" ]; extra_params = { domain_hint = "test.org"; }; issuer = "https://login.test.org"; scope = [ "groups" "email" "openid" ]; strip_email_domain = true; client_secret_path = ""; client_id = ""; }; ### Environment ```markdown - OS: - Headscale version: - Tailscale version: ``` ### Runtime environment - [ ] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ### Anything else? _No response_
adam added the bug label 2025-12-29 02:26:47 +01:00
adam closed this issue 2025-12-29 02:26:47 +01:00
Author
Owner

@sergiofteixeira commented on GitHub (Mar 5, 2025):

headscale 25.1, tailscale 1.80

@sergiofteixeira commented on GitHub (Mar 5, 2025): headscale 25.1, tailscale 1.80
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#966