CodeIgniter Forums

Full Version: Cannot login with CI4 after updating Chrome?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ...
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.
If it's a CORS problem you can try adding this to your .htaccess file in the root with index.php

<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 * ""##
        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"

Chrome is getting very strict on all this CORS stuff so best to learn it.
Turned out I had to change the SameSite to Lax ... and remove Secure ... weird that it worked until the update.
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;