0
I am developing an App with Cordova and wanted to know if it is possible to use the token csrf
generated by Laravel, without having to set up the meta tag using Blade, as taught on the site:
<meta name="csrf-token" content="{{ csrf_token() }}">
Because it is obviously not possible to use Blade or PHP in Cordova to generate HTML, CSS and Javascript-only screens.
you cannot get something like <input type="Hidden" name="_token" value="{{ csrf_token() }}" />
– Luiz Gustavo Costa Ceolin
No, because the screens of my app are html, but I use php on the server side
– Mr.Bobot
your screens are in . html?
– Luiz Gustavo Costa Ceolin
Yes, exact....
– Mr.Bobot
If you are using Cordova, you will probably make the request externally. I understand that
csrf_token
It’s to avoid forged requisitions. I would disable the csrf_token verification on the part of the API that will communicate with Cordova, and do another form of security/authentication.– Wallace Maxters
cool , actually I already disabled, already imagined that I would have to do it , thanks
– Mr.Bobot