![]() Permanent redirect to the built-in callback method and you should be fine. public static void RegisterRoutes(RouteCollection routes) It is not enough to simply direct directly to the Callback URL. Permanent redirects are the only thing that will suffice here. Make sure to add to in your APIs & auth > Credentials > Redirect URIs section.Īdd a route to a permanent redirect controller action to your routes. app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()ĬlientId = "", ![]() It gets replaced by /signin-google anyways and my attempts at getting around that caused "silent" (not in the debugger) Internal Server 500 errors. ![]() I'm using the default ASP.NET MVC 5 template with Identity Authentication for simplicity, but hopefully this can be modified for different use cases.ĭo not customize the redirect path. If I remove the authentication options from Google Authentication, it just reverts back to the old OpenID login and works fine again.Īm I missing something simple here? or is there something bad happening inside the Library that is causing the problem? Public async Task ExternalLoginCallback(string returnUrl) It does not hit the controller method below as it normally does (I have tried to place debug breakpoints within this function and it never gets stopped when there are google authentication options. Https./en/Account/ExternalLoginCallbackįor google. Https./en/Account/ExternalLoginCallback#_=_ (There is actually only a single underscore before the = sign, SO syntax removes it if I have it as it appears on my address bar). On the front end, after clicking the external login buttons, the page redirects me to the link below and returns an empty white screen Provider = new GoogleOAuth2AuthenticationProvider()Īpp.UseGoogleAuthentication(googleOAuth2AuthenticationOptions) Īfter I add options to the Google Authentication, my app does not allow the ExternalLoginCallback action to be called for either google or facebook (no changes to facebook code but the issue still affects it). ![]() Var googleOAuth2AuthenticationOptions = new GoogleOAuth2AuthenticationOptionsĬallbackPath = new PathString("/en/Account/ExternalLoginCallback"), To this: var facebookAuthenticationOptions = new FacebookAuthenticationOptions() I tried offline authorisation but I'm gettinh this message: 'There is an issue with your hardware code.' And they are telling to contact withh but this mail isn't exists. The code in (which also includes Facebook authentication) goes from this: var facebookAuthenticationOptions = new FacebookAuthenticationOptions()į("email") Īpp.UseFacebookAuthentication(facebookAuthenticationOptions) Get ExtraData from MVC5 framework OAuth/OWin identity provider with external auth provider I have tried to use Alex Wheat's Solution in the link: The steps I have Identified so far is that I have upgraded the package to version 2.1.0 as this version includes the ability to include options in the UseGoogleAuthentication method. I am currently upgrading my login process for Google to use OAuth before they depricate their OpenID login method. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |