I have a project that I created with the ASP.NET with Angular Visual Studio template with the individual accounts authentication type.
I then added Google authentication by following the steps outlined here.
However, when I try and register, I get a error in the console stating
Error: Cannot match any routes. URL Segment: ‘signin-google’.
I tried following the exact same steps but with asp.net core web app using razor pages instead of angular, and it works properly. Is there something that I am missing with Angular?
Thanks for any suggestions
2
Answers
I managed to fix my problem. Angular was taking over the routing, when asp.net Identity should have been taking over. I fixed it, by changing the redirect URL for google by adding this line "googleOptions.CallbackPath = new PathString("/Identity/signin-google");" to my Program.cs file.
You need to tell angular to exclude that route and forward it to the backend, by adding it in
proxy.conf.js
:NOTE: The full path in the default .NET Angular template is
ClientAppproxy.conf.js