Looking for some guidance on how to address this issue. I'm not seeing any logs from Heroku or Timber regarding it, so I'm not exactly sure how to solve it.
Currently the sign-up flow works fine, however the link the user receives to confirm their account just hangs. It is working fine locally.
I'm using all default settings and it's deployed on Heroku. The link is www.domain.com:52070/confirm-email/XXXXX..
Any troubleshooting advice is greatly appreciated!
After making a change and pushing it to production it seems the port number on the link has changed.
Still unable to find any errors or even requests when I try to click the link.
Found the issue, it's hanging because of the port number attached to the link. It works correctly when the port is removed (www.domain.com/confirm-email/XXXXX) instead of (www.domain.com:52070/confirm-email/XXXXX).
My next question is how do I edit the confirmation link that is sent to not include the port number?
You need to set the Phoenix URL generator opts as shown here: https://github.com/danschultzer/pow/issues/478#issuecomment-607529518
Just checked the related issue, however I do have it set already.
This is what I currently have:
url: [scheme: "https", host: "domain.com", port: System.get_env("PORT")],
Change System.get_env("PORT") to 443, or remove it entirely.
That solved the issue! Really appreciate the quick responses.
I did have an issue where if you are running behind a reverse proxy you will need to set the port explicitly otherwise it will default to the main port of the app. IE 4001 or 4000.
Most helpful comment
I did have an issue where if you are running behind a reverse proxy you will need to set the port explicitly otherwise it will default to the main port of the app. IE 4001 or 4000.