Email verification failing - heroku

I have installed Parse Server directly from Heroku and mLab button and then Deploy to Heroku Button.
This is working fine, but now I need to set up email verification. I have installed Mailgun and Mailgun Email Verification addons directly from Heroku. Under Config vars the correct keys are all there, but I get the error
An appName, publicServerURL, and emailAdapter are required for
password reset and email verification functionality. (Code: 1,
Version: 1.17.2)
I was under the impression that when installing addons directly from Heroku, the settings was deployed automatically. Do I need to configure anything else after installing?

That message isn't from Mailgun; it's from the parse server itself.
You'll have to either customize the code or configure it properly. I don't think the example code gives you a way to configure appName, publicServerUrl, or emailAdapter from the environment so you'll probably have to deploy a customized instance that sets those variables. This example looks helpful.

Related

sign up not working for heroku hosted scoold

Hi I deployed scoold to heroku following the steps here. The application is running but I cannot sign in to an account. When I tried to sign up for an account it shows that a confirmation email is sent but I don't receive one. Anyone know what's wrong?
You have not configured SMTP properly. You need a real SMTP server with a username and password. After configuring it you can resend your email confirmation and log in.
You can enable SMTP debug logging with this option:
para.mail.debug = true

Getting SSL Certificate has expired error in Laravel app, but it should should be valid

I have an laravel app served with docker which until recently has been working fine, but since about 3 days ago it is not working. The problem is that I need to get data from a remote database, which is done with the guzzlehttp client used in the laravel framework. The SSL certificate is given automatically via. Let's Encrypt nginx proxy companion, and should be working, I have for example checked it on https://www.sslshopper.com/ssl-checker.html, and it says the certificate is valid, but I still get the curl error "cURL error 60: SSL certificate problem: certificate has expired (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)".
I have tried manually to point the guzzlehttp client to the cerficate file, and even downloaded the latest cacert file and used that, but no luck. Code looks something like this:
$this->client = new Client(["verify" => '/path-to-cert-file-in-docker-container.pem']);
Even more bizarre is that I have the same app running locally, and here I don't get the error if I use the certificate from the server or from https://curl.haxx.se/ca/cacert.pem mentioned above.
I should mention that we updated the let's encrypt container giving out the certificates on the server, so I run an older version locally. But the only thing that has changed is that we pulled a new image from docker, and I don't know what this should do to make a change here. I mention this since it seems that the error started after we updated let's encrypt, but I have been unable to find the connection.
Feel free to ask any questions or request code from the project.
Thanks in advance, Richard.

Parse Server Custom Domain On Heroku

I have set up a Parse Server on Heroku, with an MLab MongoDB. Everything works fine, & when I visit https://myapp.herokuapp.com I see "Make sure to star the parse-server repo on GitHub!".
I can successfully perform API functions through my Postman Console, for example logging in via the following REST API call: https://myapp.herokuapp.com/parse/login?username=admin&password=password.
I can also perform other REST API POST, GET, etc. as you would expect.
I'm now trying to use my own domain "api.mydomain.net". In the Heroku App > Settings > Custom Domains, I have set domain to "api.mydomain.net" & "myapp.herokuapp.com" as the DNS target.
I've also added a CNAME record to the DNS pointing "api" to "myapp.herokuapp.com".
When I visit https://api.mydomain.net I see the "Make sure to star the parse-server repo on GitHub!" message confirming that the CNAME record works, however when I go to perform the same REST API Login call https://api.mydomain.net/parse/login?username=admin&password=password I get the response:
Could not get any response.
This seems to be like an error connecting to
https://api.mydomain.net/parse/login?username=admin&password=password.
What am I missing?
You are trying to securely connect to the Parse Server with https. So you have to add a TSL certificate for your Heroku app in the Heroku dashboard.
Open Heroku app in Heroku dashboard
Open Settings tab
In section Domains and certificates click Configure SSL and choose Automatically configure using Automated Certificate Management.
Click Add domain to add the domain from which the request should be forwarded, e.g. api.example.com.
On your domain registrar's website set the CNAME for api.example.com to the domain in the Heroku app settings, e.g. api.example.com.herokudns.com
Wait until the status of the domain in the Heroku dashboard is Done

Sending email via Postmark on Heroku with a MeteorJS application

I have recently deployed my MeteorJs application to Heroku and have setup the Postmark addon to be able to send emails.
I setup the MAIL_URL config item and the authentication works, but when an email is sent Postmark returns this error:
ErrorCode: '400', Message: 'Sender signature not defined for From address.'.
The From address that Meteor sets by default is no-reply#meteor.com. I tried setting up a signature in my Postmark addon using my personal email, but you can't do that either.
Anyone have luck getting this setup?
You need to define a sender signature:
To get started, run heroku addons:open postmark and create your first sender signature.

How can I configure Meteor to use Amazon SES when running on Heroku?

I would like to use the built in email methods that Meteor provides, but I need my app to run on Heroku and use the smtp endpoint of Amazon SES to transport my message.
I'm using the Meteorite build pack and the accounts-password package.
Follow instructions below to get meteor emails sending correctly from heroku using amazon ses
1) set up smtp access via aws console, get your smtp credentials
2) using a javascript console (chrome dev tools / firebug) run
encodeURIComponent("SES_SMTP_USERNAME")
encodeURIComponent("SES_SMTP_PASSWORD")
to encode the username/password for use in your smtp url
3) take resulting strings to build your smtp url like so
smtp://ENCODED_USER:ENCODED_PASS#SES_SMTP_URL:465
4) set the MAIL_URL variable to tell meteor to use this method for sending emails
heroku config:add MAIL_URL=YOUR_SMTP_URL
(do not surrond the url with qoutes)
5) set sender to be a SES verified sender within your meteor app via
Accounts.emailTemplates.from = "SENDER_NAME <SENDER_EMAIL>";
That will allow Meteor default email methods to function properly.
In addition to what you've suggested in your gist you could also use Meteor.http methods with SES API and send a POST/GET request.
Full API docs at http://docs.aws.amazon.com/ses/latest/DeveloperGuide/QueryInterface.Examples.html
Of course this is a manual solution, and wont use the built in meteor mail method. It can however be corrected by redefining the mail function via Email.send = function(...
UPDATE
You can also use the email-ses package on atmosphere
mrt add email-ses
More info here: https://atmospherejs.com/package/email-ses

Resources