mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-25 01:07:52 +00:00
Provide LoginName when registering with pre-auth key
This commit is contained in:
parent
d6b383dd2f
commit
cfda804726
@ -435,6 +435,10 @@ func (h *Headscale) handleAuthKeyCommon(
|
|||||||
|
|
||||||
resp.MachineAuthorized = true
|
resp.MachineAuthorized = true
|
||||||
resp.User = *pak.Namespace.toUser()
|
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)
|
respBody, err := h.marshalResponse(resp, machineKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().
|
log.Error().
|
||||||
|
Loading…
x
Reference in New Issue
Block a user