{"id":1946,"date":"2022-06-12T00:22:00","date_gmt":"2022-06-12T00:22:00","guid":{"rendered":"https:\/\/www.qworqs.com\/?p=1946"},"modified":"2022-10-17T09:53:23","modified_gmt":"2022-10-17T09:53:23","slug":"laravel-social-login-the-whole-story","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2022\/06\/12\/laravel-social-login-the-whole-story\/","title":{"rendered":"Laravel Social Login, simple step by step (The whole story)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is OAuth2<\/h2>\n\n\n\n<p>If you are a web developer, you probably understand that OAuth (2) is how you allow your visitors to login to your website using their facebook, twitter, or even github credentials (Too many to name).<\/p>\n\n\n\n<p>The uncontested champion of a plugins to log in users to your website using social networks is <strong>Laravel Socialite<\/strong>, (More like register to your website, but you get the idea)  <\/p>\n\n\n\n<p>So, to avoid confusion, <strong>socialite <\/strong>is the plugin you are looking for, Passport and Sanctum ARE NOT MEANT FOR THIS PURPOSE. here is how they are different<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Plugin<\/td><td>About<\/td><\/tr><tr><td><code>Socialite<\/code><\/td><td><code>Allows you to easily integrate the option to login to your website with a popular website's credentials<\/code><\/td><\/tr><tr><td><code>Sanctum<\/code><\/td><td><code>The opposite of Socialite, Allows an application to authenticate users using your website as a back-end, usually useful when you create mobile apps for example.<\/code><\/td><\/tr><tr><td><code>Passport<\/code><\/td><td><code>Same concept as Sanctum, but <strong>with OAuth2<\/strong>, <strong>Unless you need OAuth2, don't use this<\/strong>, Sanctum provides a much simpler API authentication development experience.<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Now, let us get to adding social login to our application, socialite.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is OAuth2 If you are a web developer, you probably understand that OAuth (2) is how you allow your visitors to login to your website using their facebook, twitter, or even github credentials (Too many to name). The uncontested champion of a plugins to log in users to your website using social networks is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,123,160,1],"tags":[],"class_list":["post-1946","post","type-post","status-publish","format-standard","hentry","category-laravel","category-php","category-software-development","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=1946"}],"version-history":[{"count":15,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1946\/revisions"}],"predecessor-version":[{"id":1972,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1946\/revisions\/1972"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=1946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=1946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=1946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}