mirror of
https://github.com/ReVanced/revanced-api.git
synced 2026-01-10 21:36:18 +00:00
fix: Specify a validation function to fix authentication
This commit is contained in:
@@ -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) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user