[SOLVED] Facebook-accounts redirect_uri is incorrect localhost:3000



This just isn’t correct and it’s reaaaaaly screwing me up. I’ve set the ROOT_URL, I’ve added entries in Facebook app manager – but upon clicking login from Meteor, this is the request sent out.


You need to edit the app settings on Facebook

see: Users and Accounts | Meteor Guide

EDIT: Poking around a bit more, the actual url is built using Meteor.absoluteUrl, which should be using ROOT_URL

The only time it wouldn’t use it is if you pass in options with a different rootUrl to Meteor.loginWithFacebook? Which I assume you’re not doing.

Maybe it’s not picking up your ROOT_URL correctly? Have you logged out process.env.ROOT_URL to check what Meteor is seeing?

1 Like

You’re a genius. Thanks pal. Looks like my settings are not correctly setting the absolute URL, so if I fix that this should work! I’m on Windows which is kinda stupid for setting the environment variable.

Yep! When I run in console the URL is incorrect, but what FB is returning:

It should be my dev.mycompany.com

1 Like

Weird, I had to use set ROOT_URL=whatever.com

OUTSIDE of my .bat script then it works. Weird.

But it’s working now, THANKS

1 Like

Hahah come back all this time later to find I found the solution, AGAIN. Thanks ME!

What was your solution? I can’t make it work in development mode. I set ROOT_URL=whatever.com but it’s always localhost:3000