[英]Configuring ember-simple-auth with ember-cli-simple-auth-token
[英]Ember-simple-auth with ember-cli-simple-auth-token
我正在尝试将ember-simple-auth与ember-cli-simple-auth-token一起使用:
"ember-cli-simple-auth-token": "^0.7.3",
"ember-simple-auth": "1.0.1"
那就是我的配置:
ENV['simple-auth-token'] = {
authorizer: 'simple-auth-authorizer:token',
identificationField: 'email',
serverTokenEndpoint: 'http://localhost:3000/token'
};
我想念什么吗? 原因我在控制台中收到此错误:
找不到从
simple-auth-token/authenticators/token
导入的模块simple-auth/authenticators/base
我已经尝试卸载和npm prune,然后重新安装..并始终显示相同的消息。
多谢你们。
插件的名称为ember-simple-auth
,它正在寻找路径simple-auth/authenticators/base
,该路径应为ember-simple-auth/authenticators/base
。 您应该在文件simple-auth-token/authenticators/token
更正该导入。
否-simple-auth-token尚未更新。 进行了一些小的更改似乎又使它继续进行,我将其发布给作者。
需要对ember-simple-auth-token模块进行的更改是:
1)app / initializers / simple-auth.js:
建立)。
2)addon / authenticators / token.js:将第2行的“ simple-auth”更改为“ ember-simple-auth”
3)addon / authorizers / token.js:将第2行的:simple-auth更改为“ ember-simple-auth”
希望这可以帮助一些在那里苦苦挣扎的人。
干杯!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.