1

Could somebody explain, or better tell me how to fix this problem?

The link found in the "account creation verification email" on Parse-Server (/Heroku), is not working.

The relevant code in index.js is like this:

var api = new ParseServer({
  databaseURI: .....,
  cloud: .....,
  appId: .....,
  ..........
  publicServerURL: process.env.PARSE_PUBLIC_SERVER_URL || 'https://myapp.herokuapp.com',
  appName: 'WonderApp',
  ..........
  verifyUserEmails: true,
  emailAdapter: {
    module: 'parse-server-mailgun',
    options: {
      // The address that your emails come from
      fromAddress: 'yaya@abc.com',
      // Your domain from mailgun.com
      domain: 'xyz.com',
      // Your API key from mailgun.com
      apiKey: 'key-key-key-key-key-key-key-key',
      // The template section 
      templates: {
        verificationEmail: {
          subject: 'Confirm your account',
          pathPlainText: resolve(__dirname, 'verification_email.txt')
        },
      }
    }
  }
});

The verification mail is sent as expected, when an account is created. The user also receives it(as expected). The mail looks like:

Please confirm your account by clicking on the link below.

https://myapp.herokuapp.com/apps/YAdLIExyzABC(K#!qB....../verify_email?token=....uxY&username=theguy

But, then when clicking the link here what appears in the web browser:

Cannot GET /apps/YAdLIExyzABC(K 

This is not what I expect.

Could someone see where the problem could be?

One more thing I noticed, after trying many things to solve this problem is that, when typing the following line in the web browser :

https://myapp.herokuapp.com/apps/

I get this:

Cannot GET /apps/

I have the feeling this is not supposed to happen. But does anyone know why this happens?

Michel
  • 10,303
  • 17
  • 82
  • 179

1 Answers1

0

The URL part YAdLIExyzABC(K#!qB...... is your app ID.

It seems that the app ID contains invalid characters that do not allow it to be used in the URL, such as (, # and !. The app ID should contain only characters and numbers.

In the configuration you posted here you replaced the app ID with ....., so to know for sure, it would be necessary to see what you actually set as app ID.

Manuel
  • 14,274
  • 6
  • 57
  • 130