chore(easyauth) valide

This commit is contained in:
kekskurse 2024-09-27 01:12:34 +02:00
parent 387b59789b
commit 1e61d9dd15

View file

@ -51,6 +51,11 @@ func (e EasyAuth) GetUser(w http.ResponseWriter, r *http.Request) (AuthentikUser
return e.jwtSecret, nil return e.jwtSecret, nil
}) })
if !parsedAccessToken.Valid {
e.redirectAuth(w, r)
return AuthentikUser{}, false, nil
}
claims := parsedAccessToken.Claims.(*UserClaims) claims := parsedAccessToken.Claims.(*UserClaims)
return claims.User, true, nil return claims.User, true, nil