Validating and verifying JWT signature and audience not working in ktor

Hi There,

I have been replicating the following tutorial: Adding Auth0 Authorization to a Ktor HTTP API
And the header { Authorization: Bearer ${token} is being sent correctly from the frontend to the ktor server (backend in kotlin).
Verification seems to go well, the correct audience and issuer are added, but in the line validate {credential → validateCreds(credential)} it goes wrong within validate{} → Here, it stops in the line: “authenticationFunction = validate” .

When pasting the bearer token in jwt.io it provides me with the correct payload.

Can anyone help and see what goes wrong?



Hi, I am facing similar problem, did you find the solution?