Category: Laravel, Laravel, api, api

While I was developing an API for a mobile app, I faced the issue of how I could implement a social authentication (Facebook, Google) between our mobile app and our API. I knew about Laravel’s Socialite package for implementing that in the web (with redirects and callbacks…

After some search and testing I figured out the best way of doing this, with best practises and security in mind. This is a clear and co mplete implementation flow and example, of how I achieved that easily with Laravel, Laravel Passport and Laravel Socialite.

I skipped the setup process of Laravel, Passport, Socialite and extra checks, try-catch blocks etc.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners