Skip to content

Add RSVP Token Authentication and Form Improvements#1116

Merged
mauteri merged 56 commits intodevelopfrom
GP-1087
Aug 11, 2025
Merged

Add RSVP Token Authentication and Form Improvements#1116
mauteri merged 56 commits intodevelopfrom
GP-1087

Conversation

@mauteri
Copy link
Copy Markdown
Contributor

@mauteri mauteri commented Jul 2, 2025

Description of the Change

Major Features

• New RSVP Token System: Enables anonymous users to manage RSVPs via email-delivered tokens without requiring site accounts
• Interactive RSVP Forms: Added AJAX-powered form submission with real-time validation and error handling
• Email Token Confirmation: Automated email workflow for token-based RSVP authentication

Core Functionality

• Open RSVP Management: Users can update RSVP status through tokenized links sent to their email
• Form Field Processing: Enhanced custom field validation and sanitization with schema-based processing
• Nonce Handling: Dynamic nonce management with automatic retry logic for expired tokens

Code Architecture

• Method Refactoring: Moved form-related methods from Rsvp_Setup to Rsvp_Form class for better organization
• Built-in Fields Management: Extracted hard-coded field lists into reusable class constants
• API Enhancements: Extended REST API endpoints to support token-based authentication

Developer Experience

• Comprehensive Testing: Added unit tests for new token system and form processing functionality
• Documentation Updates: Added CLAUDE.md for AI-assisted development and updated hook
documentation
• Code Quality: PHPStan fixes, linting improvements, and consistent code formatting across PHP and JavaScript files

Closes #1087 #1093

How to test the Change

Changelog Entry

Added - New feature
Changed - Existing functionality

Credits

Props @mauteri

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Jul 2, 2025

PR Summary

  • Introduction of RSVP Token Management
    A new system was developed for managing RSVP tokens, which are used for event reservations. This includes generating and checking these tokens for validity.

  • Updates to RSVP Handling
    The logic for handling RSVPs was updated, with an added function for verifying tokens that are used during the RSVP process.

  • Enhancements to Event Scheduling Tool
    Plans were noted for an update that would better accommodate different types of user inputs (e.g., user ID or email address) for scheduling events.

  • Improved User Identification for Comments
    The system was refined for processing comments, ensuring users are correctly identified by their email and handling token creation and validation when a comment is submitted.

  • Addition of Token Retrieval Logic From URL
    A method was introduced for extracting and checking tokens from URL parameters, adding further capabilities to the RSVP system.

  • Integration of RSVP Approval Process
    A method was established to give RSVPs approval status based on the validity of a token received from a URL. This enhances the reliability of the RSVP process.

@mauteri mauteri changed the title Started work on RSVP Token. RSVP Token System and Workflow Aug 3, 2025
@mauteri mauteri changed the title RSVP Token System and Workflow Open RSVP Token System and Workflow Aug 3, 2025
CLAUDE.md Outdated
- `composer format` - Auto-fix PHP coding standards issues
- `composer test` - Run PHP unit tests
- `composer test:phpstan` - Run PHPStan static analysis
- `composer compat` - Check PHP compatibility
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Need to update these as many use npm not composer to run.

@mauteri mauteri changed the title Open RSVP Token System and Workflow Add RSVP Token Authentication and Form Improvements Aug 9, 2025
@mauteri mauteri marked this pull request as ready for review August 9, 2025 15:05
@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#1116 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

Copy link
Copy Markdown
Collaborator

@stephenerdelyi stephenerdelyi left a comment

Choose a reason for hiding this comment

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

looks great to me, @mauteri. I did my usual rounds of testing on this PR and didn't come across any gotchas

@mauteri mauteri merged commit 5acc505 into develop Aug 11, 2025
20 checks passed
@mauteri mauteri deleted the GP-1087 branch August 11, 2025 15:39
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.

Implement Guest RSVP Submission and Magic Link Generation

2 participants