Search code examples
javascriptnode.jsexpressparse-platformparse-server

Parse Server - How to Translate The Pages of Email Confirmation and Password Reset


I have a project with parse server which I need translate the pages of Email Confirmation and Password Reset, and I don't find anywhere a solution for this. I found about the emails templates, but not about the pages where the user go after click on the link sent to email by Parse Server.


Solution

  • As Davi Macedo showed, I create the files and solved the problem with them. But I don't know if Parse should automatically replace the files in public_html. In my case just put the files there was not enough. My solution was create /public/pages with the custom files, and point my customFiles config like that:

    customPages: {
        passwordResetSuccess: base + "/public/pages/password_reset_success.html",
        verifyEmailSuccess: base + "/public/pages/verify_email_success.html",
        invalidVerificationLink:  base + "/public/pages/invalid_verification_link.html",
        invalidLink:  base + "/public/pages/invalid_link.html",
        choosePassword: base + "/public/pages/choose_password.html",
        linkSendSuccess: base + "/public/pages/link_send_success.html",
        linkSendFail: base + "/public/pages/link_send_fail.html",
      }
    

    Besides, to choose password page I used this file: https://github.com/parsegroundapps/pg-app-tynwrjdecdmr69ke5d8fec6ixljzx5/tree/master/public/pages

    Another detail is that the file choose_password.html on the repository above makes de POST request adding "/1/" to url, but in my case, I needed make the url pointing to "/parse", so I replaced the line 181 to

    var base = window.location.origin + '/parse/';