Login with OIDC after having been logged out (#1719)
This commit is contained in:
parent
4ea12f472a
commit
cbf57e27a7
1 changed files with 13 additions and 0 deletions
|
@ -199,6 +199,19 @@ func (h *Headscale) handleRegister(
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// When logged out and reauthenticating with OIDC, the OldNodeKey is not passed, but the NodeKey has changed
|
||||||
|
if node.NodeKey.String() != registerRequest.NodeKey.String() &&
|
||||||
|
registerRequest.OldNodeKey.IsZero() && !node.IsExpired() {
|
||||||
|
h.handleNodeKeyRefresh(
|
||||||
|
writer,
|
||||||
|
registerRequest,
|
||||||
|
*node,
|
||||||
|
machineKey,
|
||||||
|
)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if registerRequest.Followup != "" {
|
if registerRequest.Followup != "" {
|
||||||
select {
|
select {
|
||||||
case <-req.Context().Done():
|
case <-req.Context().Done():
|
||||||
|
|
Loading…
Reference in a new issue