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 Answers1

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.

Lena Weber
  • 303
  • 1
  • 4
AMaina
  • 11
  • 3