-
-
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
Reimplement Parse Frame URL #3090
Comments
Here's a quick (but hacky) implementation of what I was talking about: Add config to self-hosted parse // self-hosted parse server's index.js
var api = new ParseServer({
...,
customPages: {
parseFrameURL: "http://myserver.com/handle-parse-iframe",
invalidLink: "http://localhost:1337/public/invalid_link.html",
}
... Changes needed in // parse-server/lib/Controllers/UserController.js
// call to setPasswordResetToken() around line 182
if (_this3.config.parseFrameURL) {
var strippedResetLink = _this3.config.requestResetPasswordURL.replace(_this3.config.publicServerURL, '');
var link = _this3.config.parseFrameURL + '?link=' + encodeURIComponent(strippedResetLink) + '&token=' + token + '&username=' + username;
} else {
var link = _this3.config.requestResetPasswordURL + '?token=' + token + '&username=' + username;
} Is there a way to achieve this without changing |
did you try setting publicServerURL ? |
To be honest it just feels like an important variable which I didn't want to change because I need a single functionality slightly modified. I still want the server to be used/accessible on my-parse-server.com but to send password reset links pointing to different domain (eg. my-website.com). I'll see if changing |
ok in your case you want different domains for your links right? I belive this is a valid feature request. |
I'll prepare a PR with the code above but keep in mind I'm not a node ninja ;) |
No need to be a ninja! You identified the issue and have a workaround :) I'll help you along the way with the PR open. |
There is no easy way to reimplement what was known as "Parse Frame URL" that was used to mask Parse.com URLs on user-facing pages.
This URL was used for displaying pages dealing with password reset (and email confirmation which we're not using). Because the current setup already works (with parse.com) we'd like to keep the same functionality since we already solved the styling issues on the destination page that displays content within an IFRAME.
The link itself is constructed in
parse-server/lib/Controllers/UserController.js:185
but I'm not sure how I could prepend the Frame URL and send the link as params. Something like:The text was updated successfully, but these errors were encountered: