|
@@ -92,6 +92,7 @@ export const authOptions: NextAuthOptions = {
|
|
|
medicalHistory: user.medicalHistory || undefined,
|
|
medicalHistory: user.medicalHistory || undefined,
|
|
|
allergies: user.allergies || undefined,
|
|
allergies: user.allergies || undefined,
|
|
|
currentMedications: user.currentMedications || undefined,
|
|
currentMedications: user.currentMedications || undefined,
|
|
|
|
|
+ dataProcessingConsent: user.dataProcessingConsent,
|
|
|
};
|
|
};
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
// Si no es error de "usar autenticación local", fallar
|
|
// Si no es error de "usar autenticación local", fallar
|
|
@@ -146,6 +147,7 @@ export const authOptions: NextAuthOptions = {
|
|
|
medicalHistory: user.medicalHistory || undefined,
|
|
medicalHistory: user.medicalHistory || undefined,
|
|
|
allergies: user.allergies || undefined,
|
|
allergies: user.allergies || undefined,
|
|
|
currentMedications: user.currentMedications || undefined,
|
|
currentMedications: user.currentMedications || undefined,
|
|
|
|
|
+ dataProcessingConsent: user.dataProcessingConsent,
|
|
|
};
|
|
};
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error("Error en autenticación local:", error);
|
|
console.error("Error en autenticación local:", error);
|
|
@@ -196,6 +198,7 @@ export const authOptions: NextAuthOptions = {
|
|
|
emergencyContact: token.emergencyContact as string | undefined,
|
|
emergencyContact: token.emergencyContact as string | undefined,
|
|
|
medicalHistory: token.medicalHistory as string | undefined,
|
|
medicalHistory: token.medicalHistory as string | undefined,
|
|
|
allergies: token.allergies as string | undefined,
|
|
allergies: token.allergies as string | undefined,
|
|
|
|
|
+ dataProcessingConsent: token.dataProcessingConsent as boolean | undefined,
|
|
|
currentMedications: token.currentMedications as string | undefined,
|
|
currentMedications: token.currentMedications as string | undefined,
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|