简体   繁体   中英

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. With a Devise Authenticator I've setup a custom URL for the serverTokenEndpoint.

(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 . Which the endpoint doesn't exist.

Why is the configured URL not being used?

Or are there any other places this URL is set? 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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