I could use a hand validating an Auth0 JWT from a .Net8 console app.
I’ve gone through numerous examples and searches, but can only get calls to SecurityToken.ValidateToken to throw an exception, complaining that “Decryption failed. No Keys tried”
Attaching screen shots of my Client TypeScript code, and my .Net8 code in my sample API endpoint.
Server code to validate it. The token itself shows up here looking just like it does on the client’s end before sending it to the server. The server seems to receive the Token just fine, as delivered in an HTTP Header. The last line throws the aforementioned error:
Thank you for posting your question on the Auth0 Community!
Please take a look at this community post. As mentioned in there, when you are making a request to your /authorize endpoint, you might not be passing in audience parameter and you are receiving an opaque token which cannot be validated.
You can try to decode the current access token that your code receives on jwt.io to see if it is by any chance malformed.