Put your token in your meta tag of your header (If that doesn't exist yet). Configure your ajax to always pick the token from header so you don't have to include it in every ajax result.
Angular 4/5 and Laravel 5.5 XSRF-TOKEN
I'm currently working in a web where i use Angular 5 and Laravel 5.5 i am having a trouble on implementing XSRF-TOKEN, On the documentation of Laravel 5.5 XSRF-TOKEN laravel send XSRF-TOKEN inside the header on Angular i get the token and when i going to make POST request i put X-XSRF-TOKEN header which contain the XSRF-TOKEN that i get. But it still give me an error and i tried to find where the error came and that lead me to the tokensMatch() inside VerifyCsrfToken Class and i found out that when they matching the decrypted XSRF-TOKEN and $requrest->session()->token() using hash_equals() it returns false that's why i am receiving TokenMismatchException.
Is there a way to resolve this? if yes how. Thank you.
Please or to participate in this conversation.