You're looking for the app.UseExternalSignInCookie() extension method.
ASP.NET MVC 5 App using OWIN with Facebook log-in throwing reference error
-
27-09-2022 - |
Вопрос
I"m following along with this tutorial:
I'm attempting to log-in using Facebook. I copied this code almost verbatim:
using Microsoft.AspNet.Identity;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Microsoft.Owin.Security.Forms;
using Owin;
namespace WineNight
{
public partial class Startup
{
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
public void ConfigureAuth(IAppBuilder app)
{
// 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
app.UseSignInCookies();
app.UseFacebookAuthentication(
appId: "000000000000000",
appSecret: "000000000000000");
app.UseGoogleAuthentication();
}
}
}
I'm getting an error when I call UseSignInCookies
:
Owin.IAppBuilder
does not contain a definition for UseSignInCookies
and no extension method UseSignInCookies
accepting a first argument of type Owin.IAppBuilder
could be found (are you missing a using directive or an assembly reference?)
C:\users\chris\documents\visual studio 2013\Projects\WineNight\WineNight\App_Start\Startup.Auth.cs
I installed the beta package for Microsoft.Owin.Security.Forms
, but I'm still getting this error. Where does this extension method reside?
Решение
Не связан с StackOverflow