Skip to content

Feature/3 reset password#8

Open
GRE3E wants to merge 7 commits intodevelopfrom
feature/3-reset-password
Open

Feature/3 reset password#8
GRE3E wants to merge 7 commits intodevelopfrom
feature/3-reset-password

Conversation

@GRE3E
Copy link
Copy Markdown

@GRE3E GRE3E commented May 19, 2025

✅ Pull Request: Implementación de envío de correo para restablecimiento de contraseña
Historia de Usuario:
Como estudiante de la plataforma,
quiero ingresar mi correo electrónico e ingresar la nueva contraseña,
para poder reestablecer mi contraseña.

✔️ Criterios de aceptación cumplidos

  • El frontend del correo es responsive
    Se creó una plantilla HTML adaptable a dispositivos móviles y pantallas de todos los tamaños, asegurando compatibilidad con los principales clientes de correo.

  • El correo se envía inmediatamente después del registro (máx. 1 minuto)
    El auth-ms genera un código de confirmación y realiza un request gRPC al notifications-ms, que envía el correo de forma inmediata. Se validó que el tiempo total de respuesta está dentro del límite esperado.

  • El correo tiene branding reconocible
    La plantilla implementada incluye los colores institucionales de UGuimar y estilo visual consistente con la identidad de la plataforma.
    🧪 Pruebas

  • Se agrego un usuario nuevo para la prueba de correo
    1

  • Se envio mediante el microservicio auth-ms
    "http://localhost:8081/api/auth/password-reset/request"
    image

  • Se entrego correctamente el correo con el codigo extraido de auth en segundos
    image

  • Para levantar el microservicio de notifications-ms se necesita colocar las siguientes lineas de codigo en el docker-compuse.yml
    notification-service:
    build:
    context: ./notifications-ms
    dockerfile: Dockerfile
    container_name: notification-service
    ports:
    - "8082:8082"
    - "9092:9092"
    environment:
    - SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE:-dev}
    - CONFIG_SERVER_HOST=config-server:8888
    - CONFIG_SERVER_PASSWORD=${CONFIG_SERVER_PASSWORD:-configpassword}
    - EUREKA_URI=http://service-discovery:8761/eureka/
    - MAIL_HOST=${MAIL_HOST}
    - MAIL_PORT=${MAIL_PORT}
    - MAIL_USERNAME=${MAIL_USERNAME}
    - MAIL_PASSWORD=${MAIL_PASSWORD}
    - MAIL_AUTH=true
    - SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH=true
    - SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE=true
    - SPRING_MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL=smtp
    depends_on:
    service-discovery:
    condition: service_healthy
    networks:
    - uguimar-network
    healthcheck:
    test: [ "CMD", "curl", "-f", "http://localhost:8082/actuator/health" ]
    interval: 20s
    timeout: 10s
    retries: 5
    start_period: 60s

  • Además se tendra que agregar estos valores en el .env principal de proyecto:
    MAIL_HOST=smtp.gmail.com
    MAIL_PORT=587
    MAIL_USERNAME=tu-correo@gmail.com
    MAIL_PASSWORD=tu-contraseña

@GRE3E GRE3E requested a review from TadeoPG May 19, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant