Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rameezisrar's avatar

Auth2 login from Gmail and facebook

Instead of laravel default registration and login, I want the user to be able to log in using their Gmail or facebook profiles. How can I achieve this? Also, I need to grab the users id as the user will be able to purchase products.

0 likes
2 replies
mvd's avatar

Hi Abudo,

Check Laravel Socialite, https://github.com/laravel/socialite

Laravel Socialite provides an expressive, fluent interface to OAuth authentication with Facebook, Twitter, Google, LinkedIn, GitHub and Bitbucket. It handles almost all of the boilerplate social authentication code you are dreading writing.

1 like

Please or to participate in this conversation.