Provide LoginName when registering with pre-auth key

This commit is contained in:
kyra authored and Kristoffer Dalby committed 2022-11-06 19:09:52 +01:00
1 parent d6b383dd2f
commit cfda804726
1 file changed
+4
+4
View File
@@ -435,6 +435,10 @@ func (h *Headscale) handleAuthKeyCommon(
resp.MachineAuthorized = true
resp.User = *pak.Namespace.toUser()
// Provide LoginName when registering with pre-auth key
// Otherwise it will need to exec `tailscale up` twice to fetch the *LoginName*
resp.Login = *pak.Namespace.toLogin()
respBody, err := h.marshalResponse(resp, machineKey)
if err != nil {
log.Error().