skip to Main Content

I need to integrate my ASP.NET Web API with Google and Facebook OAuth. I was following all the steps from https://bitoftech.net/2014/08/11/asp-net-web-api-2-external-logins-social-logins-facebook-google-angularjs-app/
but no luck..

Every time I login to my Google Account, it always returns an “Access denied” xml page.

Every time I login to my Google Account, it always returns an "Access denied" xml page.
I believe there is something wrong with my code, not my Google OAuth 2.0 Client IDs since I downloaded Taiseer’s sample code and run it on my localhost and it succeed to authenticate my Google account.

But no idea why in my code it doesn’t work. Desperately need some advice.

2

Answers


  1. Chosen as BEST ANSWER

    I solved my problem. The issue coming from Microsoft.Owin.Security.Google library. I was using version 3.0.1 but after I update to the newest version, boom... Voila! It works..


  2. I got this error "access_denied" also, because I hadnt added my google email to the list of Test Users in the google developer console, under OAuth consent screen.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search