You need to use JWT (JSON web tokens) authentication process, you can not use the csrf_token directly in the React Native/Weex.
Here is a link to the package that you can use with the laravel: https://github.com/tymondesigns/jwt-auth
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Anyone plugged in a RN app into a laravel backend before?
I am looking at having users log into via the react native app into the laravel backend system. I am having trouble making these requests as the token is obviously missing.
I was thinking of fetching the token on the login page via react native fetch and then send the login details in the body and the token in the headers to login route.
I found this link https://stackoverflow.com/questions/44451576/including-csrf-token-in-a-post-request-from-react-native-app?answertab=oldest#tab-top but not quite understanding the solution here.
@azhard4int thanks for the information I did some more digging and found a tutorial that does it with angular. I used the same steps and it works for me :)
For the laravel side of things: https://scotch.io/tutorials/token-based-authentication-for-angularjs-and-laravel-apps
For the RN side of things: https://dzone.com/articles/adding-authentication-to-your-react-native-app-usi-1
Please or to participate in this conversation.