You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -27,6 +28,14 @@ export function addGoogleStrategy(
27
28
28
29
constemail=emails[0].value;
29
30
31
+
// Only trust the email if Google asserts it's verified, since account
32
+
// linking keys off it. See isGoogleEmailVerified.
33
+
if(!isGoogleEmailVerified(profile)){
34
+
thrownewError(
35
+
"Google login refused: the Google account's email is not verified. Sign in with an account whose email Google has verified, or use magic-link / GitHub."
36
+
);
37
+
}
38
+
30
39
// SSO auto-discovery gate — BEFORE findOrCreateUser, so an
31
40
// SSO-enforced domain never gets this Google identity linked onto
0 commit comments