Django rest + ember simple auth The authenticator "authenticator:oauth2" rejected to restore the session - invalidating…

I use django rest framework and token auth as a backend auth. From backend token comes as this format

{token: “cKCxxxxxxxxxxxxxxxxxxxxx”}

on the frontend ember-simple auth i use oauth2 as a authenticator when i try to login it says:

The authenticator “authenticator:oauth2” rejected to restore the session - invalidating…

and session is not saved it logged in but when the route change it logged out. How do i append token in headers? It has to be appended automatically when use ember-simple-auth right or i get that wrong???


  actions: {
    authenticate(username, password) {
      var controller = this.controller;         
      this.get('session').authenticate('authenticator:oauth2', username, password).catch((reason) => {
        controller.set('errorMessage', reason.detail || reason);

and authenticator:

import OAuth2PasswordGrant from 'ember-simple-auth/authenticators/oauth2-password-grant';

export default OAuth2PasswordGrant.extend({
  serverTokenEndpoint: '',


import OAuth2Bearer from 'ember-simple-auth/authorizers/oauth2-bearer';

export default OAuth2Bearer.extend({


import DS from 'ember-data';
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';

export default DS.RESTAdapter.extend(DataAdapterMixin, {
  host: '',
  namespace: 'api',
  authorizer: 'authorizer:oauth2',