I am trying to implement the email verification system on Parse-Server (/Heroku), when a user account is created; so that the user can confirm his/her account creation.

Things are working well for those matters:

  • I can create a working account.
  • The user receives the verification email that is expected.

The problem is this:

  • When the user clicks on the link inside the verification email. This is what appears in the browser:

    {"error":"unauthorized"}

Has anyone seen a similar issue and knows how to solve it?

I had the same issue with Heroku. Check that all your SMTP config variables are set properly on heroku instance. Mastodon production.rb uses these variables to determine how to send outgoing email. These variables exist in the mailgun dashboard, and it's very easy to map them.

Use config, config:set, config:get and config:unset of the Heroku CLI’s for managing your config vars:

$ heroku config:set GITHUB_USERNAME=johnroyce
//Adding config vars and restarting myapp... done, v12
GITHUB_USERNAME: johnroyce

$ heroku config
GITHUB_USERNAME: johnroyce
OTHER_VAR:    production

$ heroku config:get GITHUB_USERNAME
johnroyce

$ heroku config:unset GITHUB_USERNAME
//Unsetting GITHUB_USERNAME and restarting myapp... done, v13

Heroku considers these config vars as environment variables for the application. These persistent variables remain in place across the app deployment and restart. Unless you want to change values of these variables, all you need is to set them once.

  • This is interesting. How do you check that? – user3863666 Mar 21 at 2:14
  • The fact is that I almost never log into my mailgun account. And I have never heard (as far as I remember) of SMTP_*config variables on heroku. – user3863666 Mar 21 at 2:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.