-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Token Mismatch on logon #2826
Comments
Check that your APP_URL in your env is exactly the same as the URL you're using in your browser, and make sure the storage directory and your temp directory are writable. |
I've double checked all of those. But I shall triple check in the morning. I'm not sure if they'll be the issue as the site logs in fine with IE :/ |
Can you tell me what version of Laravel you've got? |
As requested, the Laravel Version is 5.2.45 |
Damn. There was a change in the way the web middleware works in 5.2.7, and was hoping that might be the issue. Are you behind a load balancer or anything that might be doing something funny with sessions? It looks like you're not the only one having this issue: Can you show me what you have for your (Make sure to run |
Nope, there's no load balancer at all :)
I have tried with the COOKIE_DOMAIN configured as the domain however, this made no difference. |
I have that issue (reported as #2837). |
It seems the issue is with SECURE_COOKIES |
That doesn't really make sense though. HTTPS-only cookies are accepted in all browsers. |
I'm sure this is a dumb question, but can you confirm that you don't have any settings or plugins in chrome that would block cookies? |
Also, can you see if you can reproduce on the demo? I just fixed some of the HTML that was improperly nested, which chrome can sometimes choke on. If that works, you might try pulling from master. |
The issue you referenced this one to was the same upgrade path 👍 There shouldn't be any plugins, however I shall double check on Monday when I am back in the office. The demo works fine from my personal laptop, however, I will have to test it from the computers it was tested on at work. |
Hello there :) I have double checked and there are no plugins at all in Google Chrome. |
And you're running this over https, right? |
Also, if you set ENCRYPT to true, and enable the SECURE_COOKIES option, does it still fail? (You'll need a COOKIE_DOMAIN value set to the domain you're accessing the site from as well) |
After setting SECURE_COOKIES back to true. This issue has resolved itself on my end on all devices! |
Also yes, this is running over HTTPS :) |
Spoke too soon! It's dropped again. I shall have a look at the suggested methods above Have looked again and the issue hasn't resolved with these settings |
Same thing happened to me. It turned out that my latest upgrade to 3.6.1 replaced the .htaccess file under /public, which turned off the rewrite that forced SSL. Browsing from an insecure URL, combined with the secure cookie set to true prevented login. I uncommented the rewrite rules and once my URL was once again https://, login worked again. @snipe, I know this may be a longshot, but is there any way to make those .htaccess rules something that can be switched on and off in the ENV file (or something more immutable) so they aren't overwritten by upgrades? It's an easy step to forget. Thanks! |
@steveelwood unfortunately no. htaccess is at the web server layer, and the .env stuff is parsed by PHP. |
Expected Behavior (or desired behavior if a feature request)
Type correct username and password, login and see the Snipe Dashboard
Actual Behavior
You are redirected to the logon screen.
This has been replicated on multiple computers running Google Chrome 54.0.2840.71, however the site functions correctly in Internet Explorer - haven't tried another browser.
The session file created reports "Your form session has expired. Please try again."
Please confirm you have done the following before posting your bug report:
Please provide answers to these questions before posting your bug report:
3.4.0.9
Windows Server 2012 and IIS
Manual installation
N/A
/login
N/A
No
app/storage/logs
and your webserver's logs.Session file reports
All has worked OK except this
N/A
The text was updated successfully, but these errors were encountered: