0

I am reading documentation of the Ember Simple Auth. I want to send authorized ajax request (outside of the Ember store).

I've found out there is a method for that. However when I try it to call inside my component, I get error "TypeError: this.get(...).authorize is not a function". What am I doing wrong?

Here's my code:

import Ember from "ember";

export default Ember.Component.extend({
    session: Ember.inject.service('session'),
    actions: {
        del: function() {
            var self = this;
            console.log(this.get('session'));
            this.get('session').authorize('authorizer:oauth2-bearer', function(header, content) {
                ...
            });
        }
    }
});
yaqwsx
  • 569
  • 1
  • 5
  • 14

1 Answers1

0

One rule you should apply when you upgrade ember plugin - make sure the older NPM version is uninstalled properly - or you will have many, many problems like I had.

Uninstalling the older version completly solved my problem.

yaqwsx
  • 569
  • 1
  • 5
  • 14