use the csrf token automatically generated by the Flag without using the Slide

Asked

Viewed 182 times

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() }}" />

  • No, because the screens of my app are html, but I use php on the server side

  • your screens are in . html?

  • Yes, exact....

  • 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.

  • cool , actually I already disabled, already imagined that I would have to do it , thanks

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.