简体   繁体   English

Ember-Simple-Auth自定义的Devise Authenticator serverTokenEndpoint默认为用户/登录

[英]Ember-Simple-Auth customised Devise Authenticator serverTokenEndpoint defaulting to users/sign_in

Pretty much as described in the title. 几乎与标题中描述的一样。 I have a basic Ember Simple Auth setup. 我有一个基本的Ember简单身份验证设置。 With a Devise Authenticator I've setup a custom URL for the serverTokenEndpoint. 使用Devise Authenticator,我为serverTokenEndpoint设置了自定义URL。

(Coffeescript) (咖啡)

devise = DeviseAuthenticator.extend

  serverTokenEndpoint: ENV.apiBaseURL + 'session'
  tokenAttributeName: 'authentication_token'
  resourceName: 'session'

export default devise

Authenticating and Invalidating are ok. 验证和无效都可以。 But trying to navigate to certain pages I get requests for - https://apiBaseURL/users/sign_in . 但是尝试导航到某些页面时,我收到了-https:// apiBaseURL / users / sign_in的请求 Which the endpoint doesn't exist. 哪个端点不存在。

Why is the configured URL not being used? 为什么未使用配置的URL?

Or are there any other places this URL is set? 还是在此URL设置了其他地方? Or used? 还是用过的? It's currently causing the page to break and the user cannot continue. 当前导致页面中断,用户无法继续。

Leaving this question here incase others stumble upon this issue as well. 如果其他人也偶然发现了这个问题,请把这个问题留在这里。 It was actually an issue with the back-end Devise setup. 后端Devise设置实际上是一个问题。

Any endpoint which required Authentication token was sending this redirect if no token found/ was invalid. 如果找不到/无效的令牌,则需要身份验证令牌的所有端点都将发送此重定向。 URL was take from the devise configuration of the back-end. URL来自后端的设计配置。

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

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