0

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
brainfood
  • 219
  • 1
  • 9

1 Answers1

0

Did you make sure that you've registered the return URL with the third party app? I get that when l haven't added the allowed return URL in the Google developer console.