Skip to content

Commit

Permalink
Implement backend functionality for newsletter subscription and unsub…
Browse files Browse the repository at this point in the history
…scription

- Added the ability to subscribe users to the newsletter, ensuring that email validation is performed.
- Implemented logic to handle resubscription for users who previously unsubscribed, generating a new unsubscribe token for them.
- Established an unsubscribe process that sets the subscriber's status to inactive while retaining the record in the database.
- Enhanced the database model to include an active status flag, which is updated based on subscription actions.
- Included comprehensive error handling for scenarios such as invalid email formats and expired tokens during unsubscribe requests.
- Updated the controller to handle subscription and unsubscription requests effectively, providing clear responses to the client.

These enhancements improve the overall user experience by providing seamless management of newsletter subscriptions.
  • Loading branch information
shreya5653 committed Oct 17, 2024
1 parent 3b2183f commit 8ee919f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/resources/application-production.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ spring.mail.password=${MAIL_SERVICE_PASSWORD}
spring.mail.properties.mail.smtp.auth=${MAIL_SERVICE_SMTP}
spring.mail.properties.mail.starttls.enable=${MAIL_SERVICE_STARTTLS}
spring.mail.properties.domain_name=${MAIL_SERVICE_DOMAIN_NAME}

# --- Oauth 2.0 Configurations ---
spring.security.oauth2.client.registration.google.client-name=google
spring.security.oauth2.client.registration.google.client-id=${YOUR_CLIENT_ID}
spring.security.oauth2.client.registration.google.client-secret=${YOUR_SECRET_KEY}
spring.security.oauth2.client.registration.google.scope=email,profile

0 comments on commit 8ee919f

Please sign in to comment.