From 5aa03ea4963819b1a67548b4c095606d9c4a0a0f Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Sun, 19 Nov 2023 17:49:55 +0100 Subject: [PATCH] fix relogin with webauth Signed-off-by: Kristoffer Dalby --- hscontrol/auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hscontrol/auth.go b/hscontrol/auth.go index 8208ecc12b..579f9a859b 100644 --- a/hscontrol/auth.go +++ b/hscontrol/auth.go @@ -711,11 +711,11 @@ func (h *Headscale) handleNodeExpiredOrLoggedOut( if h.oauth2Config != nil { resp.AuthURL = fmt.Sprintf("%s/oidc/register/%s", strings.TrimSuffix(h.cfg.ServerURL, "/"), - registerRequest.NodeKey) + machineKey.String()) } else { resp.AuthURL = fmt.Sprintf("%s/register/%s", strings.TrimSuffix(h.cfg.ServerURL, "/"), - registerRequest.NodeKey) + machineKey.String()) } respBody, err := mapper.MarshalResponse(resp, isNoise, h.privateKey2019, machineKey)