ASP.NET Core 3.1 - Issue with login/oauth2/token

Community Member

I'm using ASP.NET Core 3.1 and I keep getting errors when trying to retrieve my token from the OAuth2 workflow.

I've made a successful redirect to /login/oauth2/auth and can click on the Authorize button from Canvas.  Canvas responds back to me with the code and state parameters.  I now try to retrieve my token by sending a Post to <canvas>/login/oauth2/token but I keep getting an error:  

The SSL connection could not be established, see inner exception. 

  (Inner exception) Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..

As far as I can tell, my json httpcontent has been filled out correctly.  However, the documentation isn't clear on what is needed in the headers.

My questions:

(1)  Do I need to add any Headers to the Post command (like Content-Type / application/json; charset=utf-8)?

(2) I know that Canvas no longer accepts TLS 1.0 & 1.1 SSL Protocols.  Do I need to set the protocols to 1.2?

(3) Could this be a Certificate issue?  How can I tell?

Thank you,

  Bryan Clauss

Labels (1)