improve checks

This commit is contained in:
nathan committed 2023-04-03 08:33:31 +10:00
1 parent b45e276df5
commit 748f4251e1
9 files changed
+139 -43

No files matched your search

+1
View File
@@ -62,6 +62,7 @@ func ExtractTokenID(c *gin.Context) (uint, error) {
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"])
}
// Why return the secret??
return []byte(os.Getenv("API_SECRET")), nil
})
if err != nil {