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

feat(SPV-1419): manage contacts flow example with proper TOTP generation & validation #320

Merged
merged 8 commits into from
Jan 30, 2025

Conversation

wregulski
Copy link
Collaborator

@wregulski wregulski commented Jan 29, 2025

This pull request includes significant changes to the TOTP generation and validation functionality, along with the addition of a new task for managing contacts. The most important changes include the removal of the old generate_totp task, the introduction of a new manage_contacts task, and updates to the TOTP validation method to improve clarity and functionality.

Task Management Changes:

  • Removed the generate_totp task from examples/Taskfile.yml.
  • Added a new manage_contacts task to examples/Taskfile.yml for demonstrating TOTP generation and validation scenarios.

Codebase Updates:

  • Removed the old generate_totp.go file, which contained the previous TOTP generation logic.
  • Added a new manage_contacts.go file, which includes a comprehensive example of managing contacts and TOTP verification between users. This file introduces new configuration structures, user setup, and verification flow functions.

TOTP Validation Improvements:

  • Updated the ValidateTotpForContact method in internal/api/v1/user/totp/totp.go to rename parameters for better clarity, changing requesterPaymail to validatorContact.
  • Updated the ValidateTotpForContact method in user_api.go to reflect the same parameter renaming for consistency and clarity.

Pull Request Checklist

  • 📖 I created my PR using provided : CODE_STANDARDS
  • 📖 I have read the short Code of Conduct: CODE_OF_CONDUCT
  • 🏠 I tested my changes locally.
  • ✅ I have provided tests for my changes.
  • 📝 I have used conventional commits.
  • 📗 I have updated any related documentation.
  • 💾 PR was issued based on the Github or Jira issue.

@wregulski wregulski added the feature Any new significant addition label Jan 29, 2025
@wregulski wregulski self-assigned this Jan 29, 2025
@wregulski wregulski requested a review from a team as a code owner January 29, 2025 12:26
Copy link
Contributor

github-actions bot commented Jan 29, 2025

Manual Tests

💚 Manual testing by @chris-4chain resulted in success.

examples/manage_contacts/manage_contacts.go Outdated Show resolved Hide resolved
examples/manage_contacts/manage_contacts.go Outdated Show resolved Hide resolved
examples/manage_contacts/manage_contacts.go Show resolved Hide resolved
@wregulski wregulski added the regression-tests Runs regression tests label Jan 30, 2025
examples/manage_contacts/manage_contacts.go Outdated Show resolved Hide resolved
examples/manage_contacts/manage_contacts.go Outdated Show resolved Hide resolved
examples/manage_contacts/manage_contacts.go Outdated Show resolved Hide resolved
@chris-4chain chris-4chain added the tested PR was tested by a team member label Jan 30, 2025
@wregulski wregulski merged commit ad3ec9d into main Jan 30, 2025
15 checks passed
@wregulski wregulski deleted the feat/spv-1419 branch January 30, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Any new significant addition regression-tests Runs regression tests tested PR was tested by a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants