我正在嘗試爲Ember應用程序配置simple-auth-oauth2。如文檔所述http://ember-simple-auth.com/ember-simple-auth-oauth2-api-docs.htmlEmber配置問題
Ember Simple Auth OAuth2的配置對象。
要改變的任何值,將它們設置在應用程序的 環境對象上:
ENV [ '簡單-AUTH-的oauth2'] = {serverTokenEndpoint: '/一些/定製/端點'}
這裏是我的配置
//config/environment.js
module.exports = function (environment) {
var ENV = {
modulePrefix: 'ember-app',
environment: environment,
baseURL: '/',
API_HOST: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
}
};
ENV['simple-auth-oauth2'] = {
serverTokenEndpoint: '/some/custom/endpoint'
};
ENV['simple-auth'] = {
authorizer: 'simple-auth-authorizer:oauth2-bearer'
};
return ENV;
};
簡單的auth-的oauth2保持使用默認值。這不是特別的插件問題,我嘗試了另一個擴展('simple-auth-token'),並面對完全相同的問題 - 配置不被使用。