我正在尝试为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'),并面对完全相同的问题 - 配置不被使用。