Skip to content

Commit

Permalink
"refactor: Simplify JWT token decoding logic"
Browse files Browse the repository at this point in the history
  • Loading branch information
xDeFc0nx committed Jan 17, 2025
1 parent 5447aad commit 938b186
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions handlers/Authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ func DecodeJWTToken(token string) (string, string, error) {
return "", "", err
}

// Check if the token is valid and extract claims
if claims, ok := parsedToken.Claims.(jwt.MapClaims); ok &&
parsedToken.Valid {
// Extract the userID and connectionID from claims
userID, ok := claims["user_id"].(string)
if !ok {
slog.Error(
Expand Down

0 comments on commit 938b186

Please sign in to comment.