Skip to content

Commit c1f0f26

Browse files
aMythotaylorotwell
andauthored
Add Sanctum CSRF Token Encoding Info (laravel#10089)
* Add note about CSRF token encoding * Update sanctum.md * Update sanctum.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 981c615 commit c1f0f26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sanctum.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ axios.get('/sanctum/csrf-cookie').then(response => {
306306
});
307307
```
308308

309-
During this request, Laravel will set an `XSRF-TOKEN` cookie containing the current CSRF token. This token should then be passed in an `X-XSRF-TOKEN` header on subsequent requests, which some HTTP client libraries like Axios and the Angular HttpClient will do automatically for you. If your JavaScript HTTP library does not set the value for you, you will need to manually set the `X-XSRF-TOKEN` header to match the value of the `XSRF-TOKEN` cookie that is set by this route.
309+
During this request, Laravel will set an `XSRF-TOKEN` cookie containing the current CSRF token. This token should then be URL decoded and passed in an `X-XSRF-TOKEN` header on subsequent requests, which some HTTP client libraries like Axios and the Angular HttpClient will do automatically for you. If your JavaScript HTTP library does not set the value for you, you will need to manually set the `X-XSRF-TOKEN` header to match the URL decoded value of the `XSRF-TOKEN` cookie that is set by this route.
310310

311311
<a name="logging-in"></a>
312312
#### Logging In

0 commit comments

Comments
 (0)