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: Pass event information to verifyUserEmails #9651

Open
wants to merge 5 commits into
base: alpha
Choose a base branch
from

Conversation

Vishal4real
Copy link

@Vishal4real Vishal4real commented Mar 14, 2025

Pull Request

Issue Closes: #9505

Closes: #9505

What I Did
Added authContext support in getUserController to pass authentication details.
Updated setEmailVerifyToken to include authContext when determining whether email verification is required.

Approach
Modified getUserController to accept authContext and pass it to UserController.
Updated setEmailVerifyToken to check this.authContext when calling verifyUserEmails.
Ensured email verification is only triggered based on the authentication context

@mtrezza Just passed event information to verifyUserEmails function as mentioned in the feature!

Copy link

parse-github-assistant bot commented Mar 14, 2025

🚀 Thanks for opening this pull request!

@mtrezza mtrezza changed the title FIX: Passed event information to verifyUserEmails feat: Pass event information to verifyUserEmails Mar 15, 2025
@mtrezza
Copy link
Member

mtrezza commented Mar 15, 2025

The description doesn't sound like the change that has been described in the feature. The feature was only to pass more information to the method, not to change when it will be invoked. Could you please check.

@Vishal4real
Copy link
Author

Vishal4real commented Mar 15, 2025

Hey @mtrezza just wanted to confirm that i am on the right track like not missing out something, i will revert this changes and only pass more information such as {action, authProvider} to the method. Something more like
verifyUserEmails: (user, request) => {
return request?.sessionToken?.createdWith || {};
},

@Vishal4real
Copy link
Author

@mtrezza awaiting for your suggestion!

@mtrezza
Copy link
Member

mtrezza commented Mar 17, 2025

verifyUserEmails: (user, request) => {
return request?.sessionToken?.createdWith || {};
},

This looks strange, because sessionToken would be expected to be a string, i.e. the token, not an object. Just make a naming suggestion, that can be easily changed later. More importantly, add the code to pass the object to the verifyUserEmail method and add a test that verifies that.

I also suggest to update the PR description, because it seems to describe changes that are neither part of the issue, nor will they be included in this PR.

@Vishal4real
Copy link
Author

@mtrezza Hope this changes serves what has been asked for let me know if there is any area for improvement or suggestion

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.

Add invocation event information to verifyUserEmails parameters
2 participants