Welcome Guest, Not a member yet? Register   Sign In
Cannot login with CI4 after updating Chrome?
#1

I've updated Chrome, and made sure ALL cookies are allowed ... but I can no longer login to an admin created. I use a third-party 'plug-in' ... but as the author has added absolutely no information about this, I have no clue where I got it ... yes, I know, that's just ONE reason for not using it.

But my point is, I didn't do anything to my code ... it just stopped working after updateing Chrome (still works fine in FireFox etc.). So, I'm pretty sure it has to do with Google seriously fucking with cookies for the time being.

So, if anyone has any idea about how I can fix this without having to spend DAYs googling the crap out of it (huh, it this actually a strategy by Google ... breaking stuff so we have to Google shit, so they can sell more adds? – well, just a thought), I'd be more that happy to hear of them.

Thanks ...
Reply
#2

Please check in Chrome Dev Tools if there are errors reported in the console. If this is with cookies I suspect this may be due to CORS issue or with the SameSite attribute.
Reply
#3

(This post was last modified: 01-13-2021, 03:00 PM by InsiteFX.)

If it's a CORS problem you can try adding this to your .htaccess file in the root with index.php

Code:
<IfModule mod_headers.c>
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg|svgz|jpg|png|ico|font.css|css|js)$">
        ## Change this to your website URL not * "https://your_site.com"##
        Header set Access-Control-Allow-Origin "*"
        Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
        Header add Access-Control-Allow-Headers: "Upgrade-Insecure-Requests"
    </FilesMatch>
</IfModule>

Chrome is getting very strict on all this CORS stuff so best to learn it.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

Turned out I had to change the SameSite to Lax ... and remove Secure ... weird that it worked until the update.
Reply
#5

Glad you got it to work, I would still copy the code I posted because you will run
into more problems with CORS and using assets etc;
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB