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

Email Verification Link Generates "Invalid Verification Link" Error When username is in protectedFields #9264

Open
sidan5 opened this issue Jul 30, 2024 · 1 comment
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@sidan5
Copy link

sidan5 commented Jul 30, 2024

Issue Description

When the username field is included in the protectedFields configuration for the _User class, the email verification link generated results in an "Invalid Verification Link" error. This seems to be caused by the username parameter being set to undefined in the verification link.

Steps to reproduce

Add username to the protectedFields for the _User class in the Parse Server configuration.
Register a new user and trigger the email verification process.
Check the email verification link sent to the user's email. The username parameter in the link will be undefined.
Attempt to verify the email using the link, resulting in an "Invalid Verification Link" error.

Actual Outcome

The username parameter is set to undefined in the verification link, causing an "Invalid Verification Link" error when attempting to verify the email.

Expected Outcome

The username should be correctly included in the email verification link, and the link should allow successful email verification.

Environment

Server

Parse Server version: 7.2.0 (also tested with 7.0.0)
Operating system: macOS 14.6
Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Localhost

Database

System (MongoDB or Postgres): MongoDB
Database version: 7.0.12
Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Localhost

Client

SDK (iOS, Android, JavaScript, PHP, Unity, etc): iOS
SDK version: 1.19.4

Logs

verbose: REQUEST for [GET] /parse/apps/[APP_ID]/verify_email?token=[TOKEN]&username=undefined: {}
verbose: RESPONSE from [GET] /parse/apps/[APP_ID]/verify_email?token=[TOKEN]&username=undefined: {
  "status": 302,
  "location": "http://localhost:1337/parse/apps/invalid_verification_link.html?username=undefined&appId=[APP_ID]"

Copy link

parse-github-assistant bot commented Jul 30, 2024

Thanks for opening this issue!

@mtrezza mtrezza added type:bug Impaired feature or lacking behavior that is likely assumed bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants