changement
This commit is contained in:
@@ -5,6 +5,7 @@ const crypto = require("crypto");
|
||||
const prisma = require("./prisma");
|
||||
const transporter = require("./mailer");
|
||||
const getFrontendUrl = require("../utils/frontendUrl");
|
||||
const { normalizeEmail } = require("../validations/email.validation");
|
||||
|
||||
const PROVIDER_LABELS = { GOOGLE: "Google", FACEBOOK: "Facebook" };
|
||||
|
||||
@@ -58,7 +59,7 @@ function verifyOAuthProfile(provider) {
|
||||
|
||||
return async (accessToken, refreshToken, profile, done) => {
|
||||
try {
|
||||
const email = profile.emails?.[0]?.value;
|
||||
const email = normalizeEmail(profile.emails?.[0]?.value);
|
||||
|
||||
// Cas fréquent chez Facebook : compte ouvert avec un numéro de téléphone.
|
||||
if (!email) {
|
||||
|
||||
Reference in New Issue
Block a user