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

Sam-O's avatar
Level 1

Best practice for Laravevl Socialite API

Hello everyone, I'm using Laravel Socialite to make user able to sign up through google, i configured the package and everything is up to date and works fine.

My question is, what is the best practice to use socialite with mobile application through apis?

  1. Through two api, one for browsing accounts to choose from in the browser and another for the callback, using stateless() function.
  2. Through one api, the callback one, and use userFromToken() function.

But i have two issues,

  • one for the first method, Is it good practice to make a popup window appear in the mobile application to browse the accounts then use the callback?
  • and for the second method, Is it good practice to give the client (the mobile app) the provider id and secret to use dedicated packages and send me the access token?

how do other apps like Coursera and Udemy do it?

0 likes
0 replies

Please or to participate in this conversation.