develephant / electangular

AngularJS Module for Atom Electron
MIT License
28 stars 2 forks source link

What is the API to clear the session in electangular #1

Open gopi1989 opened 8 years ago

gopi1989 commented 8 years ago

Hi ,

I am developing application in angularJs and convert it into client application by using electron packager.All the functionalities working fine except the session clear while i do logout. I am using Shibboleth for authentication. I injected the 'electangular' dependency in app.js My code:

angular.module('wepaUI')
  .directive('wepaHeader', function () {
    return {
      restrict: 'A',
      replace: true,
      templateUrl: 'header/header.html',
      scope: {},
      controller: function ($scope, $location, session, electron) {
        $scope.isAuthenticated = function () {
          return session.isAuthenticated()
        }

        $scope.signOut = function () {
          session.destroy()
          electron.clearStorageData([] , function(data) {
          console.log(data)
           })
          $location.path('/login')
        }
      }
    }
  })

I am using clearStorageData() API to clear the shibboleth session. I am getting error like: clearStorageData() is not defined .It is the rightway to clear the session? Please help me out from this issue

develephant commented 8 years ago

I'll take a look. Thanks for reporting.