-1
當我在我的網站上使用facebook登錄時,它顯示以下錯誤:
「URL blocked:重定向失敗,因爲重定向的URI在應用程序的OAuth Client設置中不受信任確保客戶端和OAuth Web ID已啓用並且將所有應用程序的域添加到允許的URI列表中「。
如何解決這個問題,謝謝?如何登錄Facebook?
'use strict';
/*eslint no-process-env:0*/
import path from 'path';
import _ from 'lodash';
/*function requiredProcessEnv(name) {
if(!process.env[name]) {
throw new Error('You must set the ' + name + ' environment variable');
}
return process.env[name];
}*/
// All configurations will extend these options
// ============================================
var all = {
env: process.env.NODE_ENV,
// Root path of server
root: path.normalize(`${__dirname}/../../..`),
// Browser-sync port
browserSyncPort: process.env.BROWSER_SYNC_PORT || 8080,
// Server port
port: process.env.PORT || 8080,
// Server IP
ip: process.env.IP || '0.0.0.0',
// Server domain
domain: process.env.DOMAIN
|| process.env.DOMAIN
|| 'ppollit.azertysoft.com',
// Should we populate the DB with sample data?
seedDB: false,
// Secret for session, you will want to change this and make it an environment variable
secrets: {
session: 'ppollit-secret'
},
// MongoDB connection options
mongo: {
options: {
db: {
safe: true
}
}
},
facebook: {
clientID: process.env.FACEBOOK_ID || '18********3779',
clientSecret: process.env.FACEBOOK_SECRET || '7172d2d6102**********31a2fea',
callbackURL: ('http://ppollit.azertysoft.com' || '') + '/auth/facebook/callback',
},
twitter: {
clientID: process.env.TWITTER_ID || 'dDp8HdUe9E********0t0W2c',
clientSecret: process.env.TWITTER_SECRET || 'aFA7hvLH4jNpwgNAp6*******JqXZ61GqkP',
callbackURL: ('http://azertysoft.com' || '') + '/auth/twitter/callback',
redirectUri: 'http://azertysoft.com',
domain: '.com'
},
google: {
clientID: process.env.GOOGLE_ID || '96****168-jk3eu7aohfik6******moio1uee.apps.googleusercontent.com',
clientSecret: process.env.GOOGLE_SECRET || 'Void0kcp23******t9Jpfg6_C',
callbackURL: (process.env.domain || '') + '/auth/google/callback',
client_id: 'http://AIzaSyBul56OToIx2m_TNIiqLNHSl-XAxbBbkls',
redirectUri: 'http://azertysoft.com',
domain: '.com'
}
};
// Export the config object based on the NODE_ENV
// ==============================================
module.exports = _.merge(
all,
require('./shared'),
require(`./${process.env.NODE_ENV}.js`) || {});
@luschn,在localhost中工作完美,但我的問題在製作中,而且這個URL「https://www.facebook.com/dialog/oauth?response_type=code&redirect_uri=http%3A%2F%2Fppollit.azertysoft% 2Fauth%2Ffacebook%2Fcallback&scope = email%2Cuser_about_me&client_id = 1675195389157940「 – adem