2017-08-08 4 views
0

を指します。私はread.meのすべてのステップを踏んで、ステップ6:config.jsを使用してサーバーを構成します。適切に設定するconfig.jsのは

このセクションでは、「メタデータエンドポイントに値を使用するようにサンプルを更新する必要があります」と書いています。私はテナントとクライアントIDの値を知っています。私はconfig.jsで何を更新する必要があるのか​​分かりません。

configオブジェクトにclientIDを追加しましたが、nodeはclientIDをnullにすることはできないというエラーを返します。私はこれをどこに置くべきかわからない。

はここapp.jsに渡されるオブジェクトの:

 // Don't commit this file to your public repos. This config is for first-run 
exports.creds = { 
    mongoose_auth_local: 'mongodb://localhost/tasklist', // Your mongo auth uri goes here 
    identityMetadata: 'https://login.microsoftonline.com/093b18fb-a101-4e60-a38e-3a4af975a32e/.well-known/openid-configuration', // This is customized for your tenant. 
    tenant : "retailsolutions.com", 
    clientID : "093b18fb-a101-4e60-a38e-3a4af975a32e", 
    // You may use the common endpoint for multi-tenant scenarios 
    // if you do, make sure you set validateIssuer to false and specify an audience 
    // as you won't get this from the Identity Metadata 
    // 
    //identityMetadata: 'https://login.microsoftonline.com/common/.well-known/openid-configuration', 
    validateIssuer: true, // if you have validation on, you cannot have users from multiple tenants sign in 
    passReqToCallback: false, 
    loggingLevel: 'info' // valid are 'info', 'warn', 'error'. Error always goes to stderr in Unix. 
}; 

それはこの経験を持った人のために可能でしょうが良い例を提供しますか?ありがとう!

答えて

0

あなたは次のようにパスポートライブラリに渡されるoptionsにクライアントIDを設定する必要があります。

var options = { 
... 
clientID: config.creds.clientID, 
... 
} 
関連する問題