Release of the post login hook with OIDC
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 135
- 派生
- 67
- PR 合并指标
- 30 天内没有已合并 PR
描述
I was trying to implement some post login logic by following the instructions in the after_logged_in method from @clement-chaneching (https://github.com/plotly/dash-auth/blob/main/dash_auth/oidc_auth.py#L273), but could not get it to work.
"""
Post-login actions after successful OIDC authentication.
For example, allows to pass custom attributes to the user session:
class MyOIDCAuth(OIDCAuth):
def after_logged_in(self, user, idp, token):
if user:
user["params"] = value1
return super().after_logged_in(user, idp, token)
"""
I realized that this code was not released... Are there any plans for a new release integrating the latest changes to the package ?
Based on the code from 2.3.0, I ended up having to reset the server url rule for the OIDC callback in the __init__ of a MyOIDCAuth class, providing an overriden callback method (which then returns the overriden after_logged_in method). Without this my new after_logged_in method was never called (but it's possible I'm just confused about how inheritance works in this case).
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
检查第 273 行 after_logged_in 示例附近的 dash_auth/oidc_auth.py,并将其与已发布的 2.3.0 的行为进行比较。跟踪 OIDC callback 如何调用 after_logged_in,然后检查 repository 的 release process(如果有)。当文档中记录的 hook 被包含在一个已发布的 release 中,并且其 callback 行为得到验证时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- authentication
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 28/100