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

Send Slack notification for new user signups #410

Open
chibie opened this issue Jan 31, 2025 · 5 comments · May be fixed by #413
Open

Send Slack notification for new user signups #410

chibie opened this issue Jan 31, 2025 · 5 comments · May be fixed by #413

Comments

@chibie
Copy link
Contributor

chibie commented Jan 31, 2025

User Story
As an admin, I want to receive a Slack notification whenever a new user signs up, so that I can review and approve the signup in a timely manner.

Acceptance Criteria

  1. GIVEN a new user successfully signs up
    WHEN the registration process is completed
    THEN a Slack notification should be sent to a designated channel with the user's details.

  2. GIVEN a new user signs up with a provider or sender scope
    WHEN the registration process is completed
    THEN the Slack notification should include the user's role (provider or sender) and associated details (e.g., currency for providers).

  3. GIVEN a Slack notification fails to send
    WHEN the registration process is completed
    THEN the system should log the error but not interrupt the registration flow.

Tech Details

  1. Add a new Slack notification service or extend an existing one to handle user signup notifications.
  2. Modify the Register function in the AuthController to:
    • Call the Slack notification service after a successful user creation.
    • Include the following details in the notification:
      • User ID
      • Email
      • First Name
      • Last Name
      • Scopes (e.g., provider, sender)
      • Provider details (if applicable, e.g., currency)
      • Timestamp of signup
  3. Use a Slack webhook URL stored in the environment variables for sending notifications.
  4. Ensure the Slack notification is only sent in the production environment.

Notes/Assumptions

  1. The Slack webhook URL will be configured in the environment variables.
  2. Notifications are for informational purposes only and do not block the registration process.
  3. The notification should be formatted in a readable way (e.g., using Slack's block kit or markdown formatting).

Open Questions

  1. Should we include additional user details in the Slack notification (e.g., IP address, signup source)?
  2. Should we implement a retry mechanism for failed Slack notifications?
@believemanasseh
Copy link
Contributor

Can I be assigned this issue?

@Koda-Black
Copy link

Application for Slack Notification on User Signup

Hello Maintainers,

I’d love to take on this task! As a backend engineer proficient in TypeScript, Express.js, NestJS, MongoDB, and PostgreSQL, I can seamlessly integrate Slack notifications into your existing system.

Plan to Solve the Issue

  1. Extend Notification Service – Create or update the Slack notification service to handle signup events.
  2. Modify Register Function – Update the AuthController to trigger the Slack notification after successful user creation.
  3. Include Required Details – Send user ID, email, name, scopes, provider details (if any), and signup timestamp.
  4. Secure Webhook Integration – Use a Slack webhook URL stored in environment variables and restrict notifications to production only.
  5. Error Handling – Log failures without interrupting the signup flow.
  6. Format Message – Use Slack Block Kit or markdown for a structured, readable notification.

Answers to Open Questions

  • Include additional details? → Yes, IP address and signup source can help with tracking but should be configurable.
  • Retry failed notifications? → Yes, a simple retry mechanism (e.g., exponential backoff) can improve reliability.

ETA: 2 days

Looking forward to your feedback!

Best regards,
Kingsley Onuorah

@Ladii1
Copy link

Ladii1 commented Feb 1, 2025

Can I attempt this issue?

@JuViquez
Copy link

JuViquez commented Feb 2, 2025

Could I be assigned to this?

@Supa-mega
Copy link

Can I take this issue? first time contributor

@sundayonah sundayonah linked a pull request Feb 3, 2025 that will close this issue
5 tasks
@sundayonah sundayonah self-assigned this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants