简体   繁体   English

更改服务器令牌端点以进行简单身份验证设计附加

[英]Change server token end point for ember simple auth devise add on

I have an ember-cli app that uses ember simple auth(ember-simple-auth-devise) add on for authentication. 我有一个ember-cli应用程序,该应用程序使用ember简单auth(ember-simple-auth-devise)添加进行身份验证。 I need to change the token end point of my authorizer to 我需要将授权者的令牌端点更改为

http://example.com/api/v1/users/sign_in . http://example.com/api/v1/users/sign_in

In my environment.js file I have added 在我的environment.js文件中,我添加了

ENV['simple-auth'] = {
        authorizer: 'simple-auth-authorizer:devise',
        crossOriginWhitelist: ['http://example.com'] //For CORS
    };

ENV['simple-auth-devise'] = {
      serverTokenEndPoint : 'http://example.com/api/vi/users/sign_in'
    }

But on logging in its still posts the credentials to the default url ie http://example1.com/users/sign_in . 但是在登录后,仍会将凭据发布到默认的URL,即http://example1.com/users/sign_in

How can I change this url to use my rails app endpoint. 如何更改此URL以使用我的Rails应用程序终结点。

Maybe the problem is that the property key is serverTokenEndpoint with a lowercase p . 可能问题在于属性键是带有小写p的 serverTokenEndpoint If you go to API docs you can see the correct property name. 如果您访问API文档 ,则可以看到正确的属性名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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