During the OAuth2 login flow, when the user has 2FA enabled, the LoginFlow may be in a weird state
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
复现 issue 中描述的 OAuth2 登录流程,并检查电子邮件/密码步骤之后返回的 LoginFlow,尤其是 refresh 和 requested_aal。查看 ory/elements/src/react-components/ory/user-auth-card.tsx 第 129 行附近的代码,并确定 aal2 步骤的预期行为;完成的标准是流程状态与显示的身份验证步骤一致。
由索引模型根据 Issue 内容生成。
描述
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
dazzling-chandrasekhar-msru5m4b1c
Describe the bug
During the OAuth2 flow, after submitting the email/password, the user is redirected to a URL similar to the following: https://account-flows-test.bonfirehub.com/self-service/login/browser?aal=aal2&login_challenge=[…]&return_to=https%3A%2F%2Fdazzling-chandrasekhar-msru5m4b1c.projects.oryapis.com%2Foauth2%2Fauth%3F[...], which looks correct.
But the LoginFlow returned by Ory from that request has both "requested_aal": "aal2" AND "refresh": true.
I’m not sure why refresh is true here. It is causing an issue for us because when refresh is true, our code attempts to look up the user’s current session (the one we are refreshing) so we can display the email address of the account the user is logged in as.
But in this case, the session lookup fails (I believe with a 403, Session has a lower AAL than required for the identity error).
All that said, is "refresh": true expected here? Or is it a bug?
In ory/elements, the UserAuthCard will display "Confirm it's you" instead of "Two-Factor Authentication" in this scenario.
https://github.com/ory/elements/blob/main/src/react-components/ory/user-auth-card.tsx#L129
May be related to https://github.com/ory/kratos/discussions/2742
Reproducing the bug
Start the OAuth2 Login flow with a user that has 2FA enabled. After submitting email/password, the user should be redirected to the page where the user submits the 2FA code. If you inspect the LoginFlow object, it should have both refresh: true and requested_aal: 'aal2'.
Relevant log output
No response
Relevant configuration
No response
Version
Ory Network
On which operating system are you observing this issue?
Ory Network
In which environment are you deploying?
Ory Network
Additional Context
No response
- 主要语言
- Shell
- 星标
- 96
- 派生
- 8
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ory/network 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 38/100
-
Updating native registration flow with OIDC ID token for existing identity returns breaking response未关闭bug
难度 4/5 3-5 天 新手友好度 35/100
-
feat
难度 5/5 一周以上 新手友好度 25/100
-
bug
难度 4/5 3-5 天 新手友好度 30/100
-
feat
难度 5/5 一周以上 新手友好度 35/100
相似的 Issue
-
package-update
难度 2/5 1-3 小时 新手友好度 72/100
oSoWoSo/vOid_Community_repOsitory#207 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
alunduil/alunduil-chezmoi#815 ·
维护者通常 1 天内回复
-
good first issue new package
难度 2/5 1-3 小时 新手友好度 68/100
wimpysworld/deb-get#2035 ·
维护者通常 1 天内回复
-
automation documentation
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
termux/termux-packages#32085 ·
维护者通常 1 天内回复