c# - Can Not Use Twitter Authentication -


i implement authentication twitter asp.net mvc.

app.usetwitterauthentication(new twitterauthenticationoptions() {        consumerkey = "xxx",        consumersecret = "xxx", }); 

when clicked link http://localhost:55586/account/login?returnurl=%2f met error below image: don't know missed somethings or not. [enter image description here]

thank you, everyone. finally, found solution.

step 1:

app.usetwitterauthentication(new twitterauthenticationoptions() {     consumerkey = "xxx",     consumersecret = "xxx",     backchannelcertificatevalidator = new microsoft.owin.security.certificatesubjectkeyidentifiervalidator(new[]     {        "a5ef0b11cec04103a34a659048b21ce0572d7d47", // verisign class 3 secure server ca - g2        "0d445c165344c1827e1d20ab25f40163d8be79a5", // verisign class 3 secure server ca - g3        "7fd365a7c2ddecbbf03009f34339fa02af333133", // verisign class 3 public primary certification authority - g5        "39a55d933676616e73a761dfa16a7e59cde66fad", // symantec class 3 secure server ca - g4        "‎add53f6680fe66e383cbac3e60922e3b4c412bed", // symantec class 3 ev ssl ca - g3        "4eb6d578499b1ccf5f581ead56be3d9b6744a5e5", // verisign class 3 primary ca - g5        "5168ff90af0207753cccd9656462a212b859723b", // digicert sha2 high assurance server c‎a         "b13ec36903f8bf4701d498261a0802ef63642bc3" // digicert high assurance ev root ca      }), }); 

run project again. met error below: enter image description here

step 2:

https://apps.twitter.com/
go settings tab set callback url website. if not real

=> set http://google.com enter image description here

then, works me. don't know why need set callback url. after set value it, cannot set empty value. so, think it's error of twitter api.

asp-net-mvc-5-owin-twitter-auth-throwing-401-exception


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -