Skip to content

Commit

Permalink
fix: oauth2 login without cookie
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed May 15, 2024
1 parent eced9cb commit 2928ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/server/oauth2/oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ func (o *OAuth2) Login(c *gin.Context) {
}

tokenVal, err := c.Cookie("fivenet_token")
if err != nil {
o.logger.Error("failed to parse token cookie", zap.Error(err))
if err != nil && connectOnly {
o.logger.Error("failed to parse token cookie for connect only request", zap.Error(err))
o.handleRedirect(c, false, false, "invalid_request_token")
return
}
Expand Down

0 comments on commit 2928ba9

Please sign in to comment.