diff --git a/api/middleware.go b/api/middleware.go index f449847..3207395 100644 --- a/api/middleware.go +++ b/api/middleware.go @@ -87,8 +87,14 @@ func githubRestVerifyMiddleware(db *gorm.DB) mux.MiddlewareFunc { return } - appId, ok := claims["iss"].(string) - if !ok { + var appId string + + switch v := claims["iss"].(type) { + case string: + appId = v + case float64: + appId = strconv.FormatFloat(v, 'f', -1, 64) + default: http.Error(w, "Invalid JWT", http.StatusUnauthorized) return }