Skip to content

Commit 275cc28

Browse files
committed
Do not strip nodekey prefix on handle expired
1 parent c5ba755 commit 275cc28

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

protocol_common.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ func (h *Headscale) handleNewMachineCommon(
490490
Bool("noise", machineKey.IsZero()).
491491
Str("machine", registerRequest.Hostinfo.Hostname).
492492
Msg("The node seems to be new, sending auth url")
493+
493494
if h.oauth2Config != nil {
494495
resp.AuthURL = fmt.Sprintf(
495496
"%s/oidc/register/%s",
@@ -727,7 +728,7 @@ func (h *Headscale) handleMachineExpiredCommon(
727728
if h.oauth2Config != nil {
728729
resp.AuthURL = fmt.Sprintf("%s/oidc/register/%s",
729730
strings.TrimSuffix(h.cfg.ServerURL, "/"),
730-
NodePublicKeyStripPrefix(registerRequest.NodeKey))
731+
registerRequest.NodeKey)
731732
} else {
732733
resp.AuthURL = fmt.Sprintf("%s/register/%s",
733734
strings.TrimSuffix(h.cfg.ServerURL, "/"),

0 commit comments

Comments
 (0)