Tôi đã triển khai ứng dụng tới Heroku, tuy nhiên khi bạn nhấp vào 'đăng nhập bằng facebook', bạn sẽ được chuyển hướng đến http://localhost:3000/#=. Tôi đã thử như sau (người đầu tiên là nó ở đâu vào lúc này):Triển khai cho heroku mà không cần chuyển hướng đến localhost bằng gọi lại hộ chiếu
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);
});
}
));
nhưng khi tôi triển khai sử dụng:
passport.use(new FacebookStrategy({
clientID: FACEBOOK_APP_ID,
clientSecret: FACEBOOK_APP_SECRET,
callbackURL: "/auth/facebook/callback"
},
hoặc
passport.use(new FacebookStrategy({
clientID: FACEBOOK_APP_ID,
clientSecret: FACEBOOK_APP_SECRET,
callbackURL: "https://fivemincatchup.herokuapp.com/auth/facebook/callback"
},
nó hướng đến facebook với lỗi sau:
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.
Tôi có thiếu một cái gì đó thực sự rõ ràng ?!