-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add parseFrameURL for masking user-facing pages. #3091
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CAn you add unit tests so we make sure the URL's are still properly generated and the new URL's are properly generated too?
@@ -236,6 +236,10 @@ export class Config { | |||
return this.customPages.passwordResetSuccess || `${this.publicServerURL}/apps/password_reset_success.html`; | |||
} | |||
|
|||
get parseFrameURL() { | |||
return this.customPages.parseFrameURL || null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use null, we use undefined as bottom value. You should probably check if this.customPages is not undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and will just return the value of parseFrameURL
which will be undefined
if, well, undefined.
@lenart updated the pull request - view changes |
@lenart updated the pull request - view changes |
I'm currently under pressure with current deadline - migrating app to self-hosted parse. I have 0 milage with javascript testing and currently can't afford the effort of learning how to do it. What needs to be tested is
|
@lenart updated the pull request - view changes |
Note that the build is broken, you can run npm test locally to make sure the CI passes. |
@lenart updated the pull request - view changes |
@lenart updated the pull request - view changes |
I can confirm this code works as expected - providing the same functionality that Parse.com did with it's Frame URL. 🆘 However I'd like to ask for help of someone that is more comfortable with node to write up the required specs. |
@lenart updated the pull request - view changes |
@flovilmart could you maybe find someone that's comfortable in node stack to write up tests for this PR? I really don't want it to be hanging around just because there is no test coverage. |
I'll have a look :) |
@lenart updated the pull request - view changes |
This is the sample file mentioned in the parse-community#3257 parse-community#3091 which everyone is requesting. var api = new ParseServer({ ..., customPages: { parseFrameURL: "http://myserver.com/handle-parse-iframe", ... } The parseFrameURL is actually where this HTML file will be hosted and will appear as a FrameURL to show the pages hosted using parse API.
Allow users to specify a different address which is used to mask parse requests for verifying email and resetting password. This is how Parse.com used to allow customers to gain control over page content, styling etc.
On the destination page javascript is used to check the link in the request and embed the parse server page using IFRAME.
First discussed in #3090