parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

feat: Pass event information to `verifyUserEmails`

Open Vishal4real opened this issue 9 months ago • 9 comments

Pull Request

Issue

Closes: https://github.com/parse-community/parse-server/issues/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!

Vishal4real avatar Mar 14 '25 18:03 Vishal4real

🚀 Thanks for opening this pull request!

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.

mtrezza avatar Mar 15 '25 13:03 mtrezza

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 avatar Mar 15 '25 16:03 Vishal4real

@mtrezza awaiting for your suggestion!

Vishal4real avatar Mar 17 '25 10:03 Vishal4real

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.

mtrezza avatar Mar 17 '25 19:03 mtrezza

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

Vishal4real avatar Mar 18 '25 17:03 Vishal4real

Hello @mtrezza any update on the latest push?

Vishal4real avatar Mar 20 '25 15:03 Vishal4real

@mtrezza sorry for the formatting issue hope this will be the final push! If any changes please suggest

Vishal4real avatar Mar 21 '25 16:03 Vishal4real

Hello @mtrezza what should be the next step?

Vishal4real avatar Mar 31 '25 06:03 Vishal4real