mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-22 08:03:30 +01:00
Check if the cancel function was set before using it (#893)
in some cases an IDP device flow expiration time might be shorter than 90s we should check if the cancel context was set before using it We will need a follow-up to identify and document the IDP with lower defaults. fixes #890
This commit is contained in:
parent
f66574b094
commit
a91297d3a4
@ -236,9 +236,11 @@ func (s *Server) Login(callerCtx context.Context, msg *proto.LoginRequest) (*pro
|
|||||||
}, nil
|
}, nil
|
||||||
} else {
|
} else {
|
||||||
log.Warnf("canceling previous waiting execution")
|
log.Warnf("canceling previous waiting execution")
|
||||||
|
if s.oauthAuthFlow.waitCancel != nil {
|
||||||
s.oauthAuthFlow.waitCancel()
|
s.oauthAuthFlow.waitCancel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
deviceAuthInfo, err := hostedClient.RequestDeviceCode(context.TODO())
|
deviceAuthInfo, err := hostedClient.RequestDeviceCode(context.TODO())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user