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
0
votes
2 answers

How to set XSRF-TOKEN in Angular 11 API request header in Laravel 8?

I integrate Angular (11) frontend within the Laravel 8 application. For making API requests, users are logged in. Every time the frontend Angular makes a request to the backend API, I get the following error: Status Code: 401 Unauthorized I have…
O Connor
  • 4,236
  • 15
  • 50
  • 91
0
votes
1 answer

apple sign in is returning 419 error in laravel on callback function

I am working on login with apple using laravel framework using refrence GeneaLabs/laravel-sign-in-with-apple. I have followed all the steps carefully.after login function when callback function is run by apple it gives me error code 419 i.e. issue…
0
votes
1 answer

JMeter - How to extract query string and request headers?

I am working on log-in scenario for Jmeter. Once I logged-in, I am redirected to the below…
Omeng
  • 33
  • 1
  • 4
0
votes
2 answers

Setup React/DRF without using CORS or CSRF tokens

I have seen a great tutorial on YouTube where react was manually setup with DRF. Throughout the tutorial csrf tokens and django-cors-headers were not used at all. I am trying to achieve the same using npx create-react-app however csrf tokens and…
0
votes
3 answers

Laravel 5.8 show CSRF token mismatch when submit ajax POST

I have added the code in the header view as shown below my ajax code as below $.ajaxSetup({ headers: { 'X-CSRF-TOKEN':…
0
votes
1 answer

What are some reasons I could be getting a "Forbidden (CSRF cookie not set.)" error when trying to send a delete request?

This is really confusing me because I know I'm setting the csrftoken correctly in the header. When I try and send the delete request on Postman I get the same error. I've been searching for a solution for hours and can't seem to find anything good!…
0
votes
3 answers

how to change "CSRF token mismatch" message?

I'm using larvel 8 and want to change message of "CSRF token mismatch" when using ajax post. I created a closure and passed it to the renderable method on the App\Exceptions\Handler class, but the previews message appears. This is my code: use…
0
votes
0 answers

onchange using ajax, codeigniter, dropdown, Enable CSRF Token

I want to generate a caste dropdown based on religion, Below is my Ajax Code: