GetExternalLoginInfoAsync () loginInfo gibt null zurück - aber erst nach ein paar Stunden

Ich verwende Strava als externen Anmeldeanbieter (ich nehme an, dass dies nicht mit Strava zusammenhängt, es könnte sich auch um Google oder Facebook handeln). Nach einigen Stunden / Tagen oder sogar Wochen gibt GetExternalLoginInfoAsync null zurück. Ich habe eine Reihe anderer Fragen mit demselben Problem gelesen, aber keine Lösung gefunden. Ich poste meine gesamte ConfigureAuth-Methode, nur für den Fall, dass ich bei der Bestellung etwas falsch gemacht habe.

Wenn Sie einen Strava-Account haben, könnte das Problem wahrscheinlich hier auftreten: fartslek.no / Account / Login

    public void ConfigureAuth(IAppBuilder app)
    {
        // Configure the db context, user manager and signin manager to use a single instance per request
        app.CreatePerOwinContext(ApplicationDbContext.Create);
        app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
        app.CreatePerOwinContext<ApplicationSignInManager>(ApplicationSignInManager.Create);

        // Enable the application to use a cookie to store information for the signed in user
        // and to use a cookie to temporarily store information about a user logging in with a third party login provider
        // Configure the sign in cookie
        app.UseCookieAuthentication(new CookieAuthenticationOptions
        {
            AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
            LoginPath = new PathString("/Account/Login"),
            Provider = new CookieAuthenticationProvider
            {
                // Enables the application to validate the security stamp when the user logs in.
                // This is a security feature which is used when you change a password or add an external login to your account.  
                OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
                    validateInterval: TimeSpan.FromMinutes(30),
                    regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
            },
            CookieManager = new SystemWebCookieManager()
        });            
        app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

        app.UseTwoFactorSignInCookie(DefaultAuthenticationTypes.TwoFactorCookie, TimeSpan.FromMinutes(5));

        app.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie);


        app.UseStravaAuthentication( new StravaAuthenticationOptions{
              ClientId="XXX",
              ClientSecret= "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",

        });
    }

Ich benutze diesehttps: //github.com/Johnny2Shoes/Owin.Security.Strav um StravaAuth zu bekommen.

Wenn es nicht mehr funktioniert, reicht ein Azure-Reset nicht aus, aber wenn ich eine neue Bereitstellung durchführe, funktioniert alles für eine Weile.

Ich benutze Owin 3.0.1 und Mvc 5.2.3

Antworten auf die Frage(2)

Ihre Antwort auf die Frage