![](/img/trans.png)
[英]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.