繁体   English   中英

灰烬简单身份验证与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:

  • 将第1行上的“ simple-auth”更改为“ ember-simple-auth”,然后
  • 删除(或注释掉)第2行和第9行(安装程序的导入和调用

建立)。

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM