Replies: 6 comments
-
same here as well, i keep getting |
Beta Was this translation helpful? Give feedback.
-
Same here, this has been giving me a headache all day. The CSRF token is always mismatched whilst using UUID's. It works fine if you use the File driver but that's not ideal. |
Beta Was this translation helpful? Give feedback.
-
thanks for bringing this up. all the other 419 fixes didn't work. For now, this is working for me. |
Beta Was this translation helpful? Give feedback.
-
If you have a foreign id to an uuid, always the foreign id must be an uuid. |
Beta Was this translation helpful? Give feedback.
-
I just ran into this issue and it noticed I forgot to add protected $keyType = 'string'; to my User model. Which resulted in the session setting the first few digits of the uuid as user_id on the session. |
Beta Was this translation helpful? Give feedback.
-
Not sure if someone is still having this issue, but the workaround for me was to modify the "AuthenticatedSessionController.php" to manually set the user_id before the session is regenerated, this made it work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I wanted to report this first before making a PR to the docs, to understand if my proposed solution is not in line with how it should be done or if this is an upstream laravel framework issue as how foreignId is handled?
The issue me and others keep coming across is:
$table->foreignId('user_id')->nullable()->index();
to$table->uuid('user_id')->nullable()->index();
Now the question remains: is this change not how it should be proposed into the docs and should sessions be handled differently to accommodate for both numeric and string user IDs?
Also I'm not sure to which docs to submit this warning/notice to, since it automatically affects multiple regions:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions