users keep getting logged out #49

Open
opened 2026-05-06 14:09:51 +00:00 by ammaratef45 · 4 comments
Owner

fauno: is it possible that [gitea] keeps logged in accounts after restarts? i have to re-log in almost every day

ammar: I did a quick internet search and seems like the LOGIN_REMEMBER_DAYS value defaults to 31 days and we didn't override this in our deployed app
Wondering what else could be at play here

fauno: i imagine it's some token used to sign/validate cookies that's not being persisted

ammar: Im checking the cookies I have on my browser and they don't include a cookie called gitea_incredible people refer to in this and this threads

ammar: Hmmm there is also the session provider that seems to point to memory by default and is not configured by the recipe (https://docs.gitea.com/administration/config-cheat-sheet#session-session)

fauno: is it possible that [gitea] keeps logged in accounts after restarts? i have to re-log in almost every day ammar: I did a quick internet search and seems like the LOGIN_REMEMBER_DAYS value [defaults to 31 days](https://docs.gitea.com/administration/config-cheat-sheet#security-security) and we didn't override this in our deployed app Wondering what else could be at play here fauno: i imagine it's some token used to sign/validate cookies that's not being persisted ammar: Im checking the cookies I have on my browser and they don't include a cookie called gitea_incredible people refer to in [this](https://forum.gitea.com/t/gitea-keycloak-login-session-time/9869/3) and [this](https://github.com/go-gitea/gitea/issues/28394) threads ammar: Hmmm there is also the session provider that seems to point to memory by default and is not configured by the recipe (https://docs.gitea.com/administration/config-cheat-sheet#session-session)
Author
Owner

image.png

It turns out, I wasn't letting the browser keep cookies to begin with

This eliminating some hypothesis and taking away my assumed reproduction case

Now I need to reproduce or dig deeper into settings and cookies ... etc

@fauno if you have any notes on the reported behavior it would be really helpful (Is it always after a restart? is there a noticeable cadence? is your account living native to gitea or as a remote account? do you know someone else that sees it and have similar and/or different observations to all of these?)

ofc this is a lot to ask so basically just what you know or remember, and I'll post it on matrix to solicit engagement as well.

![image.png](/attachments/8d339b95-5b6d-4592-9696-aa170f1dfa71) It turns out, I wasn't letting the browser keep cookies to begin with This eliminating some hypothesis and taking away my assumed reproduction case Now I need to reproduce or dig deeper into settings and cookies ... etc @fauno if you have any notes on the reported behavior it would be really helpful (Is it always after a restart? is there a noticeable cadence? is your account living native to gitea or as a remote account? do you know someone else that sees it and have similar and/or different observations to all of these?) ofc this is a lot to ask so basically just what you know or remember, and I'll post it on matrix to solicit engagement as well.
Owner

Thanks! I think I figured out a lead with the help of a comment from @jade.

https://git.coopcloud.tech/-/admin/config

image.png

https://docs.gitea.com/administration/config-cheat-sheet#session-session

Can someone get a PR out to configure the session management to not use memory?

And let's set LOGIN_REMEMBER_DAYS to "forever" to make up for all the log ins 😆

Thanks! I think I figured out a lead with the help of a comment from @jade. https://git.coopcloud.tech/-/admin/config ![image.png](/attachments/10aa3fe2-7b04-4667-8c24-942c23863122) https://docs.gitea.com/administration/config-cheat-sheet#session-session Can someone get a PR out to configure the session management to not use memory? And let's set `LOGIN_REMEMBER_DAYS` to "forever" to make up for all the log ins 😆
Owner

i just made the forgejo session manager configurable the other day, maybe you can cherry pick here?

coop-cloud/forgejo#31

i just made the forgejo session manager configurable the other day, maybe you can cherry pick here? https://git.coopcloud.tech/coop-cloud/forgejo/pulls/31
Owner

to answer the question, i remember it happens almost everyday i come here looking for something and i have to re-login. not today though. i created this account with the gitlab provider.

to answer the question, i remember it happens almost everyday i come here looking for something and i have to re-login. not today though. i created this account with the gitlab provider.
Sign in to join this conversation.
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/gitea#49
No description provided.