This error applies to the Single Page Application template when selecting the ASP.NET Web Application project in Visual Studio. Add a valid Facebook appId and appSec to the Startup.Auth.cs file to test the demo with external login.
I am able to login into Facebook but only if the redirect url which is defined in app.datamodel.js in the js variable siteUrl is set to '/' . As expected, when the call is made to the GetExternalLogin REST function inside the AccountController the user is sent to the Facebook page to do the external login. If I put a breakpoint inside the GetExternalLogin it is triggered as well.
However, if I change the siteUrl in the app.datamodel.js to anything else e.g. '/dummyController' the breakpoint is not triggered at all, instead the response gives the message error: invalid_request
Any idea why this does not work? Thanks!
To set a valid redirect url I had to set it inside the ValidateClientRedirectUri inside the ApplicationOAuthProvider.cs file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With