Questions tagged [csrf-token]

Use this tag for questions related to csrf (Cross-site request forgery) that involves the generation of a token.

A csrf-token is a secret value added to a web form by the server and sent back by the user as part of a POST request, used to prevent cross-site request forgeries by making sure that the user sending the POST request has actually loaded the form.

466 questions
2
votes
0 answers

Django csrf verification failed in android webview. android webview can not verify django csrf token

I designed a Django web app and then I created an android webview, in android webview, all functions work properly in the Django web app, I am using a payment gateway. Payment gateway working in all browsers but it's not working in the android web…
2
votes
2 answers

vue-cli frontend not setting CSRF cookie from Sanctum

I am developing a new frontend using Vue to access my existing Laravel 7 app, which uses Sanctum for authentication. The frontend sits on app.example.com, with the backend being moved to api.example.com. The CORS middleware and Sanctum are…
Erich
  • 2,408
  • 18
  • 40
2
votes
2 answers

Yii2 Bad Request 400 - Unable to login from iframe on another domain

I am using iframe on domain1.com And the yii2 web app is on domain2.com I am have passed domain.com url in the src of iframe on domain1.com and use this in the yii2 Access-Control-Allow-Origin: * to enable cors I can login on domain2.com but it…
Hamza Awan
  • 122
  • 1
  • 7
2
votes
2 answers

csrf_exempt Decorator does not work in Dajngo function based views

I am using React with Django, most of the client server interaction is being done through the API using Django Rest Framework. I created a standard app called mail, it has a standard view which accepts a POST request with csrf_exempt and…
Sahil
  • 1,387
  • 14
  • 41
2
votes
2 answers

Unknown errors using csrf_token. Laravel

I need to connect some files, using csrf_token (from laravel), but i have unknown errors such as: syntax error, unexpected ''css/app.css)); ?>">' (T_ENCAPSED_AND_WHITESPACE)