-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added: support for csrf tokens that apply automatically #317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly don't know if this works, because I don't use Sanctum, but I'll take your word for it (although I will test that non-Sanctum still works). Nice work, but a few notes.
Instructions for updating docs: https://scribe.knuckles.wtf/laravel/contributing#updating-documentation. At the very least, you'll need to update the config reference and add a section called "CSRF and Laravel Sanctum" under this. Do your best but don't obsess over the details, since I'll probably make some finishing touches.
null coalesce for possible missing config value Co-authored-by: Shalvah <[email protected]>
Thanks! Please update the docs. |
Great! Got a PR open here: knuckleswtf/scribe-docs#4 |
I made some changes to the code you pushed: a56eafe. It seems good, but you should pull and verify that it works for you. Also, I changed the default value of csrf_cookie_name` to match what Laravel's docs say:
Apparently, the And now I'm wondering if we need that |
removing the Okay, closing shop for now, so I've tagged v3.1.0.0. Let me know if something's broken. |
These additions allow supporting CSRF tokens for apps using Laravel Sanctum. You can provide a URL that gives you the token, which it then applies, to each URL being called.
This should address #243.
There are probably some docs updates here just to call this feature out, but I can do these when/if this is accepted.