infinite loop going back to authentication page when using OAuth in MVC5

前端 未结 2 1040
猫巷女王i
猫巷女王i 2021-02-06 02:57

I have written a webpage that takes advantage of Google/Facebook auth using MVC5 and OAuth.

Sometimes, I\'m able to auth very well using either Facebook or Google. It w

2条回答
  •  故里飘歌
    2021-02-06 03:42

    To resolve this issue: you can upgrade your application to use ASP.NET Core. If you must continue stay on ASP.NET, perform the following:

    Update your application’s Microsoft.Owin.Host.SystemWeb package be at least version and Modify your code to use one of the new cookie manager classes, for example something like the following:

    app.UseCookieAuthentication(new CookieAuthenticationOptions 
    { 
        AuthenticationType = "Cookies", 
        CookieManager = new Microsoft.Owin.Host.SystemWeb.SystemWebChunkingCookieManager() 
    });
    

    Reference Link

提交回复
热议问题