kajdehoop
kajdehoop

Reputation: 527

Socialite redirect to Facebook app instead of browser

I'm using Socialite in Laravel to authenticate users through Facebook in my back-end. The back-end functions like an API and sends the token back to the front-end after authentication so users can access their data using this token.

On desktop this works fine, but when a user uses our mobile application (Android and iOS simple webview frame) they get redirected to a browser when they click the login button. This breaks the user experience, because they have to type in their Facebook credentials, even though they are already logged in on the Facebook app on their phone.

Is there a way to redirect the users to the Facebook app to log in, while still preserving the login flow through the back-end? The easiest option would be to do login in the front-end, but then we would have to send the token to the back-end and I can't imagine any way to do this securely, because people could send any random token to the back-end to authorize themselves.

Upvotes: 4

Views: 685

Answers (1)

Kévin Husson
Kévin Husson

Reputation: 41

Maybe, you can create another Facebook app available only for web

Upvotes: 1

Related Questions