Search code examples
ruby-on-railsember.jsember-simple-auth

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. I need to change the token end point of my authorizer to

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

In my environment.js file I have added

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 i.e. http://example1.com/users/sign_in.

How can I change this url to use my rails app endpoint.


Solution

  • Maybe the problem is that the property key is serverTokenEndpoint with a lowercase p. If you go to API docs you can see the correct property name.