I'm trying to add external login providers to an SPA application, but I receive this strange message all the time: error: invalid_request
The request that I make:
using (Html.BeginForm("ExternalLogin", "api/Account", new { ReturnUrl = "/" },FormMethod.Get))
{
@Html.AntiForgeryToken()
<div id="socialLoginList">
<p>
@foreach (AuthenticationDescription p in loginProviders)
{
<button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
}
</p>
</div>
}
I tried to modify the ReturnUrl to /api/Account/ExternalLogins but it's not working. I couldn't find a good example of the Owin Implementation that explains how it should work.