Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

External authentication: a customer can get two links of the same provider

Ouverte
#900 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

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

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

  1. Enable the Google authentication plugin.
  2. Sign in to the store with a password and connect Google account A (sign in with Google while signed in).
  3. While still signed in, use "Sign in with Google" again and choose Google account B.
  4. 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

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de grandnode/grandnode2

Toutes les issues de grandnode/grandnode2

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.