Reputation:
I'm trying to use ember-simple-auth with ember-cli-simple-auth-token:
"ember-cli-simple-auth-token": "^0.7.3",
"ember-simple-auth": "1.0.1"
And that's my configurations:
ENV['simple-auth-token'] = {
authorizer: 'simple-auth-authorizer:token',
identificationField: 'email',
serverTokenEndpoint: 'http://localhost:3000/token'
};
Am i missing something? Cause i'm receiving this error in my console:
Could not find module
simple-auth/authenticators/base
imported fromsimple-auth-token/authenticators/token
I already try to uninstall and npm prune, and reinstall.. and the same message keeps showing.
Thanks guys.
Upvotes: 0
Views: 190
Reputation: 591
No - simple-auth-token hasn't been updated as yet. A couple of minor changes seems to get it going again, which I will post to the author.
The changes in the ember-simple-auth-token module required are:
1) app/initializers/simple-auth.js:
to setup).
2) addon/authenticators/token.js: change "simple-auth" on line 2 to "ember-simple-auth"
3) addon/authorizers/token.js: change :simple-auth" on line 2 to "ember-simple-auth"
Hopefully that helps a few people out there struggling with this.
Cheers!
Upvotes: 0
Reputation: 1281
The name of the addon is ember-simple-auth
and it's looking for a path simple-auth/authenticators/base
which should be ember-simple-auth/authenticators/base
. You should correct that import in the file simple-auth-token/authenticators/token
.
Upvotes: 0