简体   繁体   中英

Microsoft.Owin.Security.Facebook vs Facebook SDK for Javascript

In a .NET 4.5 Application, what are the benefits of using OWIN middleware Microsoft.Owin.Security.Facebook instead of the javaScript SDK provided by Facebook?

Looking at the example of how to setup OAuth2 Sign-on in MVC6 here http://www.asp.net/mvc/overview/security/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on , it doesn't appeal much to me.

If the user is on the website for the first time, the example on the link above redirects the user to the Register page and populate the email field with the value provided by Facebook. Is it all it does?

Because it's quite straight forward to just use the JavaScript SDK for Facebook and achieve the same result with a few lines of JavaScript.

Am I missing something? Why do people use Microsoft.Owin.Security.* libraries?

Thanks

Yes It depends on what you develop. Server side or SPA !

If you want to host your your application with Owin and use EF ,Identity,Claims. You will need Microsoft.Owin.Security.*

But for a simple SPA the javascript SDK will do !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM