Phoenix app picking up url instead of custom domain

Hi I’m working on a project running in Phoenix framework and Fly. ( I’ve integrated pow_assent for social auth. When one tries to login via Facebook using this Handsomegig · Phoenix Framework the redirect url appears to be

Found the issue. PHX_HOST was incorrectly set. Following link helped: