Fix broken resend email validation link#4002
Fix broken resend email validation link#4002funkenstrahlen wants to merge 14 commits intoparse-community:masterfrom
Conversation
it will be a view now as it contains templated parameters
|
Also the spec needs to be fixed. I did some changes in the spec but I do not think it is correct yet. |
|
Hey @funkenstrahlen, this approach seems to be the best one, perhaps we should cache the file in memory, instead of reading from it all the times. |
Do you think the increased memory footprint is worth it? This page will not be accessed very frequently. But I will leave this decision to you as you know more about parse server than I do. How can I keep it in memory? Maybe just a global variable containing the parsed page which will be initialised on first access? |
Codecov Report
@@ Coverage Diff @@
## master #4002 +/- ##
==========================================
- Coverage 92.84% 90.39% -2.45%
==========================================
Files 118 118
Lines 8381 8267 -114
==========================================
- Hits 7781 7473 -308
- Misses 600 794 +194
Continue to review full report at Codecov.
|
|
@flovilmart I implemented a first approach caching the template file in memory. It does not feel perfectly right to put this kind of code into the router file though. Also I am not an experienced JS developer. I am happy if you can take a look at my approach. |
|
@funkenstrahlen can you check, it seems there are some linting issues. |
|
Will take a look at it someday next week |
…funkenstrahlen/parse-server into fix-broken-resend-email-validation-link
| }, (error, response) => { | ||
| expect(response.statusCode).toEqual(302); | ||
| expect(response.body).toEqual('Found. Redirecting to http://localhost:8378/1/apps/invalid_verification_link.html?username=testEmailVerifyTokenValidity&appId=test'); | ||
| expect(response.body).toEqual('Found. Redirecting to http://localhost:8378/1/apps/invalid_verification_link'); |
There was a problem hiding this comment.
why are those changed? That seems to be a breaking change
|
I fixed the syntax errors, but the test cases for invalid verification link pages do still fail. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This fixes issue: #3857 (Missing mount point in "invalid_verification_link.html")
The old approach was to use Javascript and work with regex on the url. This is a bad approach.
I therefore took another approach using templating. I discovered that
changePasswordinPublicAPURouteralready uses (some kind of) templating. This is very basic but seems to work.I adopted this approach for
invalidVerificationLink.@flovilmart This change is currently untested and just a first POC. I would love to get your comment on this.