fix: Specify a validation function to fix authentication

This commit is contained in:
oSumAtrIX 2024-09-29 23:13:13 +02:00
parent 8b17d8894d
commit 53c36002e9
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -26,8 +26,9 @@ internal class AuthenticationService private constructor(
fun AuthenticationConfig.jwt() {
jwt("jwt") {
realm = "ReVanced"
verifier(JWT.require(Algorithm.HMAC256(jwtSecret)).withIssuer(issuer).build())
// This is required and not optional. Authentication will fail if this is not present.
validate { JWTPrincipal(it.payload) }
}
}