AllenNeuralDynamics / AllenNeuralDynamics/aind-data-transfer-service

Add session `max_age` to SessionMiddleware

オープン
#267 コメント 1 件 リアクション 0 件 担当者 1 名 @yosefmaru が担当を希望しています GitHub で見る
主要言語
Python
スター
3
フォーク
0
平均マージ
11分
マージ済み PR(30日)
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 を短くまとめたダイジェスト。