【问题标题】:Configuring ember-simple-auth with ember-cli-simple-auth-token使用 ember-cli-simple-auth-token 配置 ember-simple-auth
【发布时间】:2015-11-11 22:10:01
【问题描述】:

我想将 ember-simple-auth 与 ember-cli-simple-auth-token 一起使用,为此,我安装并放入了我的配置:

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

但我一直看到这条消息:

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

我安装了:

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

然后生成:

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

我缺少一些配置吗?

谢谢。

【问题讨论】:

    标签: javascript authentication ember.js ember-simple-auth


    【解决方案1】:

    你还需要配置:

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

    您还应该记住,您安装了已弃用的 Simple Auth 版本。您现在应该使用ember-simple-auth

    【讨论】:

    • 我应该生成一些东西吗??
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-16
    • 1970-01-01
    相关资源
    最近更新 更多