Description
Is your feature request related to a problem? Please describe.
I'm trying to implement OAuth authentication with PKCE.
The PKCE part requires that I send a code_verifier
with the token request but this doesn't seem to be possible. I couldn't find anyway of intercepting the Token Request in order to put the code_verifier
. As far as I understood, AspNetCore automatically get the authorization code and request for a token with it, all under the hood.
Describe the solution you'd like
To have an event like OnAuthorizationCodeReceived
like we do on the OpenId
middleware. Or maybe an even more specific, something like OnRequestForToken
.
Describe alternatives you've considered
Implement all from scratch or use a 3rd party lib (any recomendations?)
Additional context
I'm trying to implement following this tutorial that uses OpenId
. I couldn't find anything like the OnAuthorizationCodeReceived
event on the OAuth so I'm stuck in a scenario where I request for authorization with code_challenge
but I can't get the token because I can´t find a way to put the code_ verifier
in the request.
Thanks!