I'm trying to add the Google External Login feature for one of my Web Applications using Visual Studio 2017 (MVC 5 .Net Framework). By following the exact steps given before, I'm not able to make it work. And after signing in with google account (previously assigned in test users), it always redirects to the login page. In debugging mode all the variables and properties are null.
Further, on my issue, I have tried each of the following steps (based on previous solutions from StackOverflow:-
Updating all related NuGet packages to the latest version.
Configuring Authorized Javascript and redirect URL based on my project (HTTP://localhost:{port number})
The application is in Test Mode (Test users were added).
The Code for Google authentication in (App_Start-> Startup.Auth.cs) looks something like this:
app.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie);
app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() { ClientId = "My Client ID Given in Google Developer Console", ClientSecret = "My Client Secret Given in Google Developer Console" });
I don't know if someone else has faced the same issue recently. And I tested this on Asp.Net Core project, and it works fine. But it does not work in MVC 5 Framework. Please advise if any.
Best
