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

gab's avatar
Level 14

Mobile App Authentication Laravel's OpenAuth

Hi everyone

This could be off-topic but would be glad if someone can point me to the right direction.

Our Laravel's main web app is now oauth2-ready and also we also have secondary web app and other third-party web app consuming the API endpoints via oauth2.

However, I am new to mobile app and is there any way to implement login via oauth2? For example, when I click login, a "browser in the mobile app" would appear as login screen, and after login it app would capture the token for future consumption?

Or am I suppose to hardcode a Password Grant Client's secret into the distributed mobile apps?

0 likes
1 reply
zoltiecodes's avatar

Hi @gab. My advice is to create a login API endpoint that needs the user credentials and returns a token. You can store the token on the mobile phone, and add it to every requests your mobile app will make.

This way you can make a simple login form in the mobile application.

Let me know if you may need some help or clarification.

Please or to participate in this conversation.