External authentication: a customer can get two links of the same provider
Maintainer thường phản hồi trong vòng 1 ngày
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
- 57/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp, mongodb
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
Start with src/Business/Grand.Business.Authentication/Services/ExternalAuthenticationService.cs and trace Authenticate through AuthenticateNewUser to AssociateCustomer; compare its duplicate-link behavior with the existing “Account is already assigned” check. Review Views/Account/Info.cshtml for the one-link-per-provider expectation. Decide how duplicate links should be handled, then check whether a migration and cleanup report are needed before adding a unique (ProviderSystemName, CustomerId) index; done means duplicate links are prevented and existing duplicates are addressed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A customer can end up with two external sign-in links of the same provider (for example two Google accounts attached to one customer).
ExternalAuthenticationService.Authenticate → AuthenticateNewUser → AssociateCustomer(currentLoggedInUser, parameters) (src/Business/Grand.Business.Authentication/Services/ExternalAuthenticationService.cs) runs when a signed-in, registered customer completes Google or Facebook sign-in with an external account that has no link yet. It inserts a new ExternalAuthentication record without checking whether this customer already has a link of that provider.
The account page suggests one link per provider: Views/Account/Info.cshtml offers to add more external records only while the number of active providers is greater than the number of links.
How to reproduce
- Enable the Google authentication plugin.
- Sign in to the store with a password and connect Google account A (sign in with Google while signed in).
- While still signed in, use "Sign in with Google" again and choose Google account B.
- My account → external authentication: two Google records for the same customer.
Expected
One link per provider and customer: a second account of the same provider is refused with a clear message (as "Account is already assigned" is today for an external account linked to someone else), or the existing link is replaced after confirmation. A unique index (ProviderSystemName, CustomerId) on ExternalAuthentication would then enforce it for every provider (existing duplicates have to be reported/cleaned up by the migration).
Notes
The OpenID Connect login (stack #892–#897) already enforces one OIDC identity per customer on its own (deterministic link id); this issue is about Google, Facebook and other providers using ExternalAuthenticationService.
- Ngôn ngữ chính
- C#
- Star
- 1.3k
- Fork
- 549
- Merge trung bình
- 8 giờ 14 phút
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 grandnode/grandnode2
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
grandnode/grandnode2#881 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
grandnode/grandnode2#880 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Please add the offer systemĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
grandnode/grandnode2#849 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
grandnode/grandnode2#499 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
grandnode/grandnode2#410 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của grandnode/grandnode2
Issue tương tự
-
affected/v17 affected/v18 area/frontend type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
umbraco/Umbraco-CMS#24186 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
.NET Azure Functions Docs OpenTelemetry
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
getsentry/sentry-dotnet#5715 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
AssignTargetPath does not recognize forward slashes in relative path specifiersCó thể đã có người làm @AustinAviv đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 2 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
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 76/100
Fallout-build/Fallout#708 ·
Maintainer thường phản hồi trong vòng 5 ngày