Skip to content

Commit

Permalink
feat(oidc): add debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
restanrm committed Mar 18, 2022
1 parent 1c9b1c0 commit 2e04abf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ func (h *Headscale) OIDCCallback(ctx *gin.Context) {

oauth2Token, err := h.oauth2Config.Exchange(context.Background(), code)
if err != nil {
log.Error().
Err(err).
Caller().
Msg("Could not exchange code for token")
ctx.String(http.StatusBadRequest, "Could not exchange code for token")

return
Expand Down

0 comments on commit 2e04abf

Please sign in to comment.