I have an ASP.NET MVC limited stock application from Visual Studio 2013. It was created using the following settings:
Create> Project> Web> ASP.NET Web Application> OK> MVC, Individual User Accounts> OK
I am trying to log in using the Google OWIN provider and the problem.
The OWINs Configuration method is as follows:
app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, LoginPath = new PathString("/Account/Login") }); app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); var google = new Microsoft.Owin.Security.Google.GoogleOAuth2AuthenticationOptions { ClientId = "xxxxx.apps.googleusercontent.com", ClientSecret = "xxxxxxxxx-yyyyyyyyy" }; google.Scope.Add("profile"); google.Scope.Add("email"); app.UseGoogleAuthentication(google);
I click the Google provider button on the webpage, authenticate with google, go back to ExternalLoginCallback . At this stage, the process is broken into this line:
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync ();
loginInfo is null , which redirects me back to the login page without visible errors.
Kivin source share