diff options
| author | Leitwolf11 | 2026-10-16 06:46:23 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-10-16 06:46:23 +0300 |
| commit | 205d91185e22b9129c528296cf07d15225d82866 (patch) | |
| tree | 36432534da41e43d82c85089d207fa0d94f59e1e /docs | |
| parent | 3877e3318e875cdebc3d7b9bc970b4496e5183a9 (diff) | |
| download | progmaweb-205d91185e22b9129c528296cf07d15225d82866.tar.gz | |
Keep account sessions for 30 days
A session of a Progmasoft Account, whether opened with a password or with
Google, lasted 12 hours from the sign-in, and the setting could not raise
it beyond 7 days. Sessions now last 30 days by default, and
AccountSessions:LifetimeHours may set anything from 1 hour up to that new
maximum of 720 hours; a value outside the range is clamped to it, as
before.
The lifetime stays fixed from the sign-in; it is not extended by use. The
production environment file sets no lifetime, so the new default applies
there once the API is deployed. Sessions opened before keep the expiry
they were given.
New tests check the 30-day default and the clamping of 0, 12, 720 and
10 000 hours. The account API document gives the new default and range.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ACCOUNT-API.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/ACCOUNT-API.md b/docs/ACCOUNT-API.md index a6861fd..0bf05e9 100644 --- a/docs/ACCOUNT-API.md +++ b/docs/ACCOUNT-API.md @@ -119,8 +119,8 @@ to `/login?google=failed`, and the callback path is not a route. | `__Host-ProgmasoftExternal` | carries the Google identity between callback and completion | `HttpOnly`, `Secure`, `SameSite=Lax`, ten minutes | A session token is 256 random bits. The service stores only its SHA-256 digest, so a copy of the store does not -contain a usable token. A session lasts 12 hours by default; `AccountSessions:LifetimeHours` changes that, within 1 to -168 hours. +contain a usable token. A session lasts 30 days (720 hours) from the sign-in, whether the account signed in with a +password or with Google; `AccountSessions:LifetimeHours` changes that, within 1 to 720 hours. Passwords are hashed with the ASP.NET Core Identity password hasher and are never stored or logged in plain text. @@ -137,7 +137,7 @@ The client address comes from `X-Forwarded-For`, which the service accepts from | Setting | Meaning | Default | | --- | --- | --- | -| `AccountSessions:LifetimeHours` | hours a session stays valid, clamped to 1–168 | `12` | +| `AccountSessions:LifetimeHours` | hours a session stays valid, clamped to 1–720 | `720` | | `AccountSessions:CookieName` | name of the session cookie | `__Host-ProgmasoftSession` | | `Authentication:Google:ClientId` | Google OAuth client identifier | empty; Google sign-in is off | | `Authentication:Google:ClientSecret` | Google OAuth client secret | empty; Google sign-in is off | |