During the OAuth2 login flow, when the user has 2FA enabled, the LoginFlow may be in a weird state
まだ誰も着手していません。
評価
- 難易度
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 25/100
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
feat
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug cleanup
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
prime-radiant-inc/evener#3199 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
transitmatters/t-performance-dash#1217 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
ekalinin/github-markdown-toc#176 ·