mardi 12 avril 2016

Ember Simple Auth Logout Action with Django Backend

I'm using ember simple-auth library with ember simple-auth-token. However, every time I perform a logout action, django does not delete the token of the logged in user.

I should point out that the frontend works like a charm!

I am wondering is there should be a change in the frontend or in the backend code.

The invalidate() method should normally take care of the token refresh action, right?.

Here is my code, which is pretty much the same as the code presented in the README of ember simple auth.

controller/application.js

import Ember from 'ember';

export default Ember.Controller.extend({
    session: Ember.inject.service('session'),

        actions: {
            invalidateSession() {
                this.get('session').invalidate();
            }
        }
 });

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire