External authentication: a customer can get two links of the same provider
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 57/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- csharp, mongodb
- Domaine
- authentication, backend
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- C#
- Étoiles
- 1.3k
- Forks
- 549
- Merge moyen
- 8 h 14 min
- PR mergées (30 j)
- 55
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de grandnode/grandnode2
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 65/100
grandnode/grandnode2#881 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
grandnode/grandnode2#880 ·
Les mainteneurs répondent en général sous 1 jour
-
Please add the offer systemOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
grandnode/grandnode2#849 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 50/100
grandnode/grandnode2#499 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
grandnode/grandnode2#410 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de grandnode/grandnode2
Issues similaires
-
documentation
Difficulté 1/5 1-3 heures Accessibilité débutants 62/100
-
bug misleading tooling trivial
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Docs example projects pinned to a literal library version instead of 3.*Peut-être pris @DaveSkender l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
facioquo/stock-indicators-dotnet#2372 ·
Les mainteneurs répondent en général sous 1 jour
-
[Docs] officecli-docx SKILL.md still describes `\n` as a soft line break after #262Peut-être pris @giprime l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Facepunch/sbox-public#12097 ·
Les mainteneurs répondent en général sous 2 jours