AllenNeuralDynamics / AllenNeuralDynamics/aind-data-transfer-service

Add session `max_age` to SessionMiddleware

未关闭
#267 1 条评论 0 个 reaction 已指派 1 人 已被 @yosefmaru 认领 在 GitHub 查看
主要语言
Python
星标
3
派生
0
平均合并
11 分钟
30 天内合并 PR
1

描述

**Is your feature request related to a problem? Please describe.**
Currently, when the user logs in, their `userinfo` (not full token) is saved in the request session. This is saved until the user logs out, or the browser session is cleared, or the default session `max_age` of 2 weeks.

**Describe the solution you'd like**
The request session should have a shorter `max_age`. Consider having it match the auth token timeout?

**Describe alternatives you've considered**
Save and refresh the auth token if it has expired.

**Additional context**
See https://www.starlette.io/middleware/#sessionmiddleware:
> max_age - Session expiry time in seconds. Defaults to 2 weeks. If set to None then the cookie will last as long as the browser session.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。