Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jobs to send email reminders and expire tokens #85

Merged
merged 1 commit into from
Mar 9, 2025
Merged

Conversation

dkhalife
Copy link
Owner

@dkhalife dkhalife commented Mar 9, 2025

No description provided.

@Copilot Copilot bot review requested due to automatic review settings March 9, 2025 06:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds functionality for sending email reminders for expiring app tokens and cleaning up expired tokens. Key changes include:

  • Introducing a new AppTokenCleaner service in the housekeeper package with methods to send token expiration reminders and perform token cleanup.
  • Extending the UserRepository with methods to fetch tokens nearing expiration and delete stale tokens.
  • Updating configuration files, scheduler, and README to support the new token-related jobs.

Reviewed Changes

File Description
internal/services/housekeeper/app_tokens.go Adds AppTokenCleaner with SendTokenExpirationReminder and CleanupExpiredTokens methods
internal/repos/user/user.go Adds methods for retrieving nearing expiration tokens and deleting stale tokens
internal/utils/email/email.go Adds SendTokenExpirationReminder to generate email notifications
config/* Updates configs and README to include token expiration reminder settings
internal/services/scheduler/scheduler.go Adds scheduler jobs for token expiration reminder and cleanup

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

@dkhalife dkhalife merged commit 00f61c0 into main Mar 9, 2025
4 checks passed
@dkhalife dkhalife deleted the token-jobs branch March 9, 2025 06:46
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