In my Laravel8.x project, I'm facing an issue. can anyone tells me what is happing basically and what should I have to do?
Basically, If I run my project in Google chrome and try to log in it takes too much time and sends me a page expire 419 error.
But If I run my project in *Mozilla or Microsoft Edges browser the login system run smoothly no error page occurs.
I'm confused about what is going on and what I did wrong.
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" since this is a secure default value.
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => 'lax',
nothing is changed.. in same_site.
I do not understand why it take too much time in chrome. In other browser login system works properly...
Basically for authentication, I'm using the laravel-ui
Okay that is weird I am having no trouble in Chrome. Have you modified anything. Meanwhile keep your site safe. I have not had to mess with any settings to get it working in Chrome.
Edit:
I even updated chrome to latest, I logged in local development, and online.
I then logged into here (laracast), all worked well. I am guessing Jeffrey is on version 8.
So I am wondering if you had modified something in Authentication that would cause a problem with chrome?
Sure, since I first saw that discussion on GitHub I tried everything to duplicate and also couldn't.
Have apps in Laravel 8, Laravel 7 (migrating last one this week) and Laravel 6 (can't migrate this one on the short term...) and never faced that issue.
But I only use Chrome for Gmail and testing in Chrome when needed. For daily use and development I use Firefox, so my Chrome install has no extensions or any kind of plugin/modification.
So maybe it is a extension-related problem, I don't know.
@jlrdw@rodrigo.pedra Thank you very much I found it. It is an extension problem...
I tried and open new guest chrome where there is no extension installed. And RUn the project and no issue occurs.
Note: Extension causes the issue..... Now I've to figure out which extension is responsible for this :)
I had the same issue, but disabling plugins didn't work.
What worked for me was as follows:
Open Chrome, type chrome://flags in the address bar, then press “Enter“.
Find "Cookies without SameSite must be secure" and disable it.
Click "Refresh" button at the bottom.
There are a lot of secure measures in this page. You may want to tweak other flags for your cases.
I suggest you to put them back to "Default" when you go back to normal browsing after work.