[GH-ISSUE #1063] [Feature] Global dark mode - prior to logging in? #736

Closed
opened 2026-02-25 23:43:25 +03:00 by kerem · 3 comments
Owner

Originally created by @rwjack on GitHub (Sep 18, 2024).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1063

Every time my login times out, I am blasted with a white screen before I login.

This change could be a simple environment variable that enables dark mode globally (by default, meaning users can still use white mode if they chose so).

Originally created by @rwjack on GitHub (Sep 18, 2024). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1063 Every time my login times out, I am blasted with a white screen before I login. This change could be a simple environment variable that enables dark mode globally (by default, meaning users can still use white mode if they chose so).
kerem closed this issue 2026-02-25 23:43:25 +03:00
Author
Owner

@cuu508 commented on GitHub (Sep 24, 2024):

Thanks for the suggestion.

How about instead extending the session cookie age, so the session doesn't time out?

There's a SESSION_COOKIE_AGE setting, with the default value set to to 2 weeks. On Healthchecks.io I've set it to one year. This means in practice I get never automatically logged out (unless I don't visit the site for more than a year ;-).

Healthchecks does not currently read SESSION_COOKIE_AGE from an environment variable (setting an environment variable with this name currently has no effect), but we could look into doing that.

<!-- gh-comment-id:2370755771 --> @cuu508 commented on GitHub (Sep 24, 2024): Thanks for the suggestion. How about instead extending the session cookie age, so the session doesn't time out? There's a [SESSION_COOKIE_AGE](https://docs.djangoproject.com/en/5.1/ref/settings/#session-cookie-age) setting, with the default value set to to 2 weeks. On Healthchecks.io I've set it to one year. This means in practice I get never automatically logged out (unless I don't visit the site for more than a year ;-). Healthchecks does not currently read SESSION_COOKIE_AGE from an environment variable (setting an environment variable with this name currently has no effect), but we could look into doing that.
Author
Owner

@rwjack commented on GitHub (Sep 24, 2024):

Yeah, that would solve my particular issue. So to clarify, I would only get logged out, if I don't open HC for a year (with the variable set to a year obviously)?

I would honestly prefer to keep it at 2 weeks, but with that logic - so if I keep opening HC every 13 days, the cookie is refreshed and the session is extended - unless that is how it currently works?

I don't think I've ever went for 2 weeks without opening the page at least once, but I'm not 100% sure.

<!-- gh-comment-id:2370777701 --> @rwjack commented on GitHub (Sep 24, 2024): Yeah, that would solve my particular issue. So to clarify, I would only get logged out, if I don't open HC for a year (with the variable set to a year obviously)? I would honestly prefer to keep it at 2 weeks, but with that logic - so if I keep opening HC every 13 days, the cookie is refreshed and the session is extended - unless that is how it currently works? I don't think I've ever went for 2 weeks without opening the page at least once, but I'm not 100% sure.
Author
Owner

@cuu508 commented on GitHub (Oct 10, 2024):

I think I was mistaken about session expiry – Django sessions do not auto-refresh. If the session cookie expiry is 2 weeks, you get logged out after 2 weeks even if you regularly use the site. IIUC.

I think I haven't noticed logouts due to expired session, because on Healthchecks.io the expiry is 1 year, and I regularly log out and log into throwaway accounts for testing, so the 1 year expiry never comes around.

I'll look into implementing session refresh.

<!-- gh-comment-id:2404854199 --> @cuu508 commented on GitHub (Oct 10, 2024): I think I was mistaken about session expiry – Django sessions do not auto-refresh. If the session cookie expiry is 2 weeks, you get logged out after 2 weeks even if you regularly use the site. IIUC. I think I haven't noticed logouts due to expired session, because on Healthchecks.io the expiry is 1 year, and I regularly log out and log into throwaway accounts for testing, so the 1 year expiry never comes around. I'll look into implementing session refresh.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#736
No description provided.