improve checks
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user