External authentication: a customer can get two links of the same provider
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 57/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- csharp, mongodb
- Bereich
- authentication, backend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C#
- Sterne
- 1.3k
- Forks
- 549
- Ø Merge
- 10 Std. 53 Min.
- Gemergte PRs (30 T.)
- 109
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus grandnode/grandnode2
-
Add standard OCI container metadata labels to Dockerfile and CI workflowsEvtl. vergeben @moamenelbarky hat das vor 6 Tagen übernommen. Offenenhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
grandnode/grandnode2#919 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
grandnode/grandnode2#881 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
grandnode/grandnode2#880 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
grandnode/grandnode2#849 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 50/100
grandnode/grandnode2#499 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in grandnode/grandnode2
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
icsharpcode/ILSpy#4277 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
k2-fsa/sherpa-onnx#4098 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug effort:S P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
nightscout/nocturne#2633 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue hacktoberfest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100