Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#900 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, mongodb

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C#
Stelle
1.3k
Fork
549
Merge medio
8h 14m
PR unite (30g)
55

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di grandnode/grandnode2

Tutte le issue di grandnode/grandnode2

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.