OWIN’s GetExternalLoginInfoAsync Always Returns null

To get OWIN Google login to work properly on a standard Visual Studio 2013, ASP.Net MVC5 site, I had to: Setup a Google OpenId account at https://console.developers.google.com/project Set the callback URL there to blah/signin-google. Important notes on things you don’t need to do: You don’t need to use HTTPS for Google to redirect back; you … Read more

Owin Twitter login – the remote certificate is invalid according to the validation procedure

Thanks to the power of open source we can see that the thumbprints for the twitter certificates have been coded in the Katana Project. Microsoft.Owin.Security.Twitter.TwitterAuthenticationOptions Recently some certificates must have changed and now the thumbprints no longer match. Please add a new thumb print for the “VeriSign Class 3 Public Primary Certification Authority – G5” … Read more

Can’t get UserManager from OwinContext in apicontroller

I really misunderstood your question earlier. You are just missing some using statements, I think. The GetOwinContext().GetUserManager<ApplicationUserManager>() is in Microsoft.AspNet.Identity.Owin. So try add this part: using Microsoft.AspNet.Identity.Owin; using Microsoft.AspNet.Identity; // Maybe this one too var manager = HttpContext.Current.GetOwinContext().GetUserManager<UserManager<User>>();

OWIN HttpListener not located

You have to include Microsoft.Owin.Host.HttpListener.dll in your project references. You can add it through NuGet. However, if the code executing: WebApp.Start<SrvcHst> (…); is contained within a class library, make sure that the executable consuming the library also includes the reference to Microsoft.Owin.Host.HttpListener.dll, or else it would not get deployed with your program, as there are … Read more

Using bearer tokens and cookie authentication together

I think I worked this out:- Startup.Auth is wiring up the OWIN pipeline, so it is right to include Cookies and Tokens there. But one change to the cookie options specifies the authentication type it should apply to: CookieOptions = new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie }; Then I needed to configure WebAPI to only … Read more

No OWIN authentication manager is associated with the request

I found the problem finally! After comparing line by line with a newly created project and finding no difference , I checked references on both projects and yes!… All the problem was from missing package : Microsoft.Owin.Host.SystemWeb I don’t know why this packaged is missed in package installation phase but the strange point is that … Read more

Registering Web API 2 external logins from multiple API clients with OWIN Identity

Update: things have changed since I wrote this post in January: MSFT released their official OpenID connect client middleware and I worked hard with @manfredsteyer to adapt the OAuth2 authorization server built in Katana to OpenID connect. This combination results in a far easier and far more powerful solution that doesn’t require any custom client … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)