Ho distribuito un'app a Heroku, tuttavia, una volta fatto clic su "accedi con Facebook", si viene reindirizzati a http://localhost:3000/#=. Ho provato la seguente (il primo è dove si trova al momento):Distribuire su heroku senza reindirizzamento a localhost con callback passaporto
passport.use(new FacebookStrategy({
clientID: FACEBOOK_APP_ID,
clientSecret: FACEBOOK_APP_SECRET,
callbackURL: "http://localhost:3000/auth/facebook/callback"
},
function(accessToken, refreshToken, profile, done) {
process.nextTick(function() {
return done(null, profile);
});
}
));
ma quando schiero utilizzando:
passport.use(new FacebookStrategy({
clientID: FACEBOOK_APP_ID,
clientSecret: FACEBOOK_APP_SECRET,
callbackURL: "/auth/facebook/callback"
},
o
passport.use(new FacebookStrategy({
clientID: FACEBOOK_APP_ID,
clientSecret: FACEBOOK_APP_SECRET,
callbackURL: "https://fivemincatchup.herokuapp.com/auth/facebook/callback"
},
si dirige a facebook con il seguente errore:
Given URL is not permitted by the Application configuration: One or more of the given URLs is not permitted by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
Am I manca qualcosa di veramente ovvio ?!