Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
tjerman committed Feb 13, 2024
1 parent 81a7de9 commit 1679d32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/auth/handlers/handle_oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"strconv"
"strings"

"github.com/davecgh/go-spew/spew"
"github.com/lestrrat-go/jwx/jwa"
"github.com/lestrrat-go/jwx/jwk"
"github.com/spf13/cast"
Expand Down Expand Up @@ -393,9 +394,13 @@ func (h AuthHandlers) handleTokenRequest(req *request.AuthReq, client *types.Aut
userID = userID[:i]
}

spew.Dump(">> thing", ti, req.AuthUser, userID)

if req.AuthUser != nil && req.AuthUser.User != nil && req.AuthUser.User.ID == cast.ToUint64(userID) {
user = req.AuthUser.User
} else if user, err = h.UserService.FindByAny(suCtx, userID); err != nil {
}

if user, err = h.UserService.FindByAny(suCtx, userID); err != nil {
return h.tokenError(w, fmt.Errorf("could not generate token: %v", err))
}

Expand Down

0 comments on commit 1679d32

Please sign in to comment.