AuthenticationManager.GetExternalLoginInfoAsync() on google aspnet mvc5 returns null

后端 未结 5 1487
刺人心
刺人心 2021-01-05 00:04

I\'ve developed an ASPNET MVC 5 application using default Visual Studio 2015 Template and Google authentication. All works fine in the development environment but on real th

5条回答
  •  甜味超标
    2021-01-05 00:33

    I updated to version 4.0.1 of the Microsoft.Owin.Security.Google package and I was having the same problem. I was getting null and access_denied. Turns out the problem was due to a space that I had copied over in the Client Secret. It took me 2 days and lots of unnecessary code changes to figure this out. I noticed that when you click copy (not just copy) and paste from Google, there is a space at the end of the Client Secret.

提交回复
热议问题