Endlosschleife, die bei Verwendung von OAuth in MVC5 zur Authentifizierungsseite zurückkehrt

Ich habe eine Webseite geschrieben, die Google / Facebook-Authentifizierung mit MVC5 und OAuth nutzt

Manchmal kann ich sehr gut über Facebook oder Google authentifizieren. Es funktioniert ganz gut

Was aber oft passiert, ist

Navigieren Sie zur AnmeldeseiteWählen Sie entweder Google oder FacebookGeben Sie die Kontoinformationen ein und rufen Sie die erforderlichen Weiterleitungen abZurück zur Anmeldeseite umleiten, aber nicht angemeldet

Ich erhalte keine Fehler (oder suche nicht an der richtigen Stelle), die mich darauf hinweisen - ich verwende SSL auf Azure für das Hosting

Hat jemand Tipps, warum es manchmal funktioniert und manchmal nicht? das fühlt sich so an, als könnte es sich um ein Cookie oder um ein serverseitiges Konfigurationsproblem handeln? Ich kann nicht herausfinden, warum es manchmal funktionieren würde und manchmal nicht funktionieren würde.

ich habe es versucht

mit einem zweiten Rechner, der sich noch nie angemeldet hat (um Cookies auszuschließen), dasselbe ProblemLösche meinen Cookie-Cache, das gleiche Problem

Wie ich konfiguriert bin:

        public void ConfigureAuth(IAppBuilder app)
        {
            // Enable the application to use a cookie to store information for the signed in user
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/Account/Login")
            });
            // Use a cookie to temporarily store information about a user logging in with a third party login provider
            app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

            // Uncomment the following lines to enable logging in with third party login providers
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            app.UseFacebookAuthentication(
               appId: "abc",
               appSecret: "123");

            app.UseGoogleAuthentication();
        }

Ich habe dieses Tutorial befolgt, um OAuth in MVC5 zu verwenden (http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on)j

Antworten auf die Frage(1)

Ihre Antwort auf die Frage