Mar 10, 2024
0
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?
- Through two api, one for browsing accounts to choose from in the browser and another for the callback, using
stateless()function. - 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?
Please or to participate in this conversation.