2

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?

1 Answer 1

0

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.

2
  • This is interesting. How do you check that? Commented Mar 21, 2018 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. Commented Mar 21, 2018 at 2:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.