Skip to content
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

Login and Logout issue #12

Closed
dbx-3 opened this issue Jul 11, 2018 · 11 comments
Closed

Login and Logout issue #12

dbx-3 opened this issue Jul 11, 2018 · 11 comments
Labels

Comments

@dbx-3
Copy link

dbx-3 commented Jul 11, 2018

I think there is something wrong with the login session cookies. I tested several browser.
On Firefox 61.0 i can login, but after i always on the login page again. I can as an example, go to the purchase page, but when i go to the stockoverview page i see the login page again. Some pages are available and some show the login page.

On my mobile device i can login with Brave, but i can't logout. anymore.

The cookies and cache are deleted several times!

@berrnd
Copy link
Member

berrnd commented Jul 11, 2018

My private grocy installation I also access with Firefox 61 daily and haven't noticed this issue...
Have you tried without any plugins or other client-side things which may delete cookies or block something?

  • The session cookie is set here and valid for 1 year, although the session id saved in the database is only valid for 30 days as done here
  • It's never deleted client side, only when you logout the session id is invalidated in the database here

So I can only imagine that the cookie is deleted client side - have you checked if the cookie is still there when you get logged out?

Other thing would to check the sessions in the database, table sessions.

@dbx-3
Copy link
Author

dbx-3 commented Jul 11, 2018

I tested several devices and browser without any customizations. All the same strange behavior. I don't think it is an client side issue.

@berrnd
Copy link
Member

berrnd commented Jul 11, 2018

I enabled authentication on the English demo page, wich is running the latest released version 1.12.1 (both password and username is admin):
=> https://demo-en.grocy.info

Maybe you can test it there and let me know the steps to reproduce?

@dbx-3
Copy link
Author

dbx-3 commented Jul 11, 2018

On the demo page it works fine. 👍

Maybe it is a webserver issue? I will test this the next days.

@berrnd
Copy link
Member

berrnd commented Jul 11, 2018

Ok, maybe something is in the webserver logs...

Also as said maybe check the database table sessions, database is at /data/grocy.db, can be easily browsed with something like this...

@dbx-3
Copy link
Author

dbx-3 commented Jul 12, 2018

Sessions are fine in the database. Expires 2018-08-11 18:49:33.
Server Error Logs are empty. I already used another PHP Version 7.1... Same problem.

Meanwhile i think it is a cache problem. Some pages only show the login page. I set the config to german language. Some pages are still in english. Every page must individually complete reloaded to show in german. This is strange.

@berrnd
Copy link
Member

berrnd commented Jul 12, 2018

Hm, yeah - really strange...

The used templating engine (Blade from Laravel) stores cached views in data/viewcache, is this directory writable and are there files created?

@dbx-3
Copy link
Author

dbx-3 commented Jul 13, 2018

data/viewchache is writeable. There are also some php files.

@berrnd
Copy link
Member

berrnd commented Jul 26, 2018

Were you able to resolve this in the meantime or is there anything I could help with further on?

Just as a hint: If you use windows and maybe want to use grocy only localy on one machine - there is now also grocy-desktop which makes this possible without to have to manage a webserver...

@dbx-3
Copy link
Author

dbx-3 commented Jul 27, 2018

Unfortunately, no. But I'm sure it is a cache problem. At the moment I do not have the time to continue testing.

Maybe you can close as not reproducible? If there are any news a can open a new issue.

@berrnd
Copy link
Member

berrnd commented Jul 27, 2018

Ok, will close this for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants