During the OAuth2 login flow, when the user has 2FA enabled, the LoginFlow may be in a weird state
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- authentication
Hướng nghiên cứu
Tái hiện luồng đăng nhập OAuth2 được mô tả trong issue và kiểm tra LoginFlow được trả về sau bước email/mật khẩu, đặc biệt là refresh và requested_aal. Xem lại ory/elements/src/react-components/ory/user-auth-card.tsx quanh dòng 129 và xác định hành vi mong đợi cho bước aal2; hoàn tất nghĩa là trạng thái luồng và bước xác thực được hiển thị khớp với nhau.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Shell
- Star
- 95
- Fork
- 7
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ory/network
-
feat
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
-
Updating native registration flow with OIDC ID token for existing identity returns breaking responseĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Ory Account Experience (hosted UI) registration trait setup via creation of registration flowĐang mởfeat
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
selfservice.flows.login.style reverts to identifier_first despite explicitly setting passwordĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Issue tương tự
-
fix(backup-uploader): write current-round marker outside / so the container can run as non-rootĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
hiero-ledger/solo-containers#254 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CachyOS/cachyos-hooks#23 ·
-
Remove the irispy-lmsal folderĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
bug cli security sev-6
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
area/cli good first issue size/S type/feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
lorica-labs/volant#549 ·
Maintainer thường phản hồi trong vòng 1 ngày