Skip to content

Commit 7accf0e

Browse files
committed
adding dev-v0.23.0 tag to this commit to ensure building
1 parent d512c59 commit 7accf0e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

html/supertokens_python/constants.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
4242
from __future__ import annotations
4343

4444
SUPPORTED_CDI_VERSIONS = [&#34;3.0&#34;]
45-
VERSION = &#34;0.22.1&#34;
45+
VERSION = &#34;0.23.0&#34;
4646
TELEMETRY = &#34;/telemetry&#34;
4747
USER_COUNT = &#34;/users/count&#34;
4848
USER_DELETE = &#34;/user/remove&#34;
@@ -56,7 +56,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
5656
API_VERSION = &#34;/apiversion&#34;
5757
API_VERSION_HEADER = &#34;cdi-version&#34;
5858
DASHBOARD_VERSION = &#34;0.7&#34;
59-
HUNDRED_YEARS_IN_MS = 3153600000000
59+
ONE_YEAR_IN_MS = 31536000000
6060
RATE_LIMIT_STATUS_CODE = 429</code></pre>
6161
</details>
6262
</section>

html/supertokens_python/recipe/session/cookie_and_header.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.cookie_and_head
6565
available_token_transfer_methods,
6666
)
6767
from ...logger import log_debug_message
68-
from supertokens_python.constants import HUNDRED_YEARS_IN_MS
68+
from supertokens_python.constants import ONE_YEAR_IN_MS
6969

7070
if TYPE_CHECKING:
7171
from supertokens_python.framework.request import BaseRequest
@@ -419,11 +419,11 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.cookie_and_head
419419
config,
420420
&#34;access&#34;,
421421
access_token,
422-
# We set the expiration to 100 years, because we can&#39;t really access the expiration of the refresh token everywhere we are setting it.
422+
# We set the expiration to 1 year, because we can&#39;t really access the expiration of the refresh token everywhere we are setting it.
423423
# This should be safe to do, since this is only the validity of the cookie (set here or on the frontend) but we check the expiration of the JWT anyway.
424424
# Even if the token is expired the presence of the token indicates that the user could have a valid refresh
425-
# Setting them to infinity would require special case handling on the frontend and just adding 10 years seems enough.
426-
get_timestamp_ms() + HUNDRED_YEARS_IN_MS,
425+
# Some browsers now cap the maximum expiry at 400 days, so we set it to 1 year, which should suffice.
426+
get_timestamp_ms() + ONE_YEAR_IN_MS,
427427
transfer_method,
428428
request,
429429
user_context,
@@ -438,7 +438,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.cookie_and_head
438438
config,
439439
&#34;access&#34;,
440440
access_token,
441-
get_timestamp_ms() + HUNDRED_YEARS_IN_MS,
441+
get_timestamp_ms() + ONE_YEAR_IN_MS,
442442
&#34;header&#34;,
443443
request,
444444
user_context,

0 commit comments

Comments
 (0)