user5487299
user5487299

Reputation:

Configuring ember-simple-auth with ember-cli-simple-auth-token

I would like to use ember-simple-auth with ember-cli-simple-auth-token , for this, i installed and put in my configs:

  ENV['simple-auth-token'] = {
    identificationField: 'email',
    serverTokenEndpoint: 'http://localhost:3000/token'
  };

But i keep seen this message:

No authorizer was configured for Ember Simple Auth - specify one if backend requests need to be authorized.

I installed:

ember install ember-cli-simple-auth
ember install ember-cli-simple-auth-token

Then generate:

ember g simple-auth-token ember g simple-auth-token

Am i missing some configuration?

Thanks.

Upvotes: 0

Views: 87

Answers (1)

Justin Niessner
Justin Niessner

Reputation: 245449

You also need to configure:

ENV['simple-auth'] = {
  authorizer: 'simple-auth-authorizer:token'
}

You should also keep in mind that you've installed a deprecated version of Simple Auth. You should be using ember-simple-auth now.

Upvotes: 0

Related Questions