Hi Everyone,
Have an issue getting the token from my .net 6 application. I am using the following sample code provided by Auth0:
var client = new RestClient("https://mydomain/oauth/token");
var request = new RestRequest { Method = Method.Post };
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"client_id\":\"myclientid\",\"client_secret\":\"mysecret\",\"audience\":\"myaudience\",\"grant_type\":\"client_credentials\"}", ParameterType.RequestBody);
var response = client.Execute(request);
but am getting a response with the following exception:
The message received was unexpected or badly formatted.
at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__175`1.MoveNext()
at System.Net.Security.SslStream.<ReplyOnReAuthenticationAsync>d__173`1.MoveNext()
at System.Net.Security.SslStream.<ReadAsyncInternal>d__188`1.MoveNext()
I have tried enabling/disabling different security protocols for TLS, but with no luck. According to found articles it has to do with the incompatible cipher suite. Am I missing any configuration for that?