Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do you find GoogleOAuth2AuthenticationOptions?

I feel like I am missing something pretty basic however I have had a solid effort at resolving it.

Basically I am trying to follow this question's answer here: https://stackoverflow.com/a/22694372/768952

It makes use of a GoogleOAuth2AuthenticationOptions object, which from my Googling should be located here within the .net4.5 framework: Microsoft.Owin.Security.Google.GoogleOAuth2AuthenticationOptions

However my MVC project is .net 4.5 and it's not there! Despite this saying it should be: http://www.symbolsource.org/Public/Metadata/NuGet/Project/Microsoft.Owin.Security.Google/2.1.0-rc1/Release/.NETFramework,Version%3Dv4.5/Microsoft.Owin.Security.Google/Microsoft.Owin.Security.Google/GoogleOAuth2AuthenticationHandler.cs?ImageName=Microsoft.Owin.Security.Google

So where on earth is GoogleOAuth2AuthenticationOptions? haha

like image 846
Xavier Hutchinson Avatar asked Dec 19 '22 15:12

Xavier Hutchinson


2 Answers

The solution was as simple as updating the version of Microsoft.Owin.Security.Google in Nuget.

like image 184
Xavier Hutchinson Avatar answered Jan 07 '23 14:01

Xavier Hutchinson


If you're using the 3.0.0 version of Microsoft.Owin.Security.Google, you have to turn on the Google+ API in the Google Developer Console. (http://blogs.msdn.com/b/webdev/archive/2014/07/02/changes-to-google-oauth-2-0-and-updates-in-google-middleware-for-3-0-0-rc-release.aspx)

like image 32
Jami Avatar answered Jan 07 '23 14:01

Jami