Ember-simple-auth's sessionAuthenticationSucceeded does not fire

318 Views Asked by At

I want to use the sessionAuthenticationSucceeded action in my applicationRoute, but somehow it doesn't fire.

I checked and found that the trigger is being called here, but it is not actually being triggered here, neither is my custom sessionAuthenticationSucceeded action in the applicationRoute. (I also tried calling _super and commenting my custom action altogether, to make sure the default mixin action was not overwritten).

I'm using ember-cli 0.1.4 and ember-simple-auth 0.7.2 in combination with the standard oauth2 authenticator. I'm a running a canary build of ember combined with HTMLBars. Signin works fine except that the sessionAuthenticationSucceeded is not triggered (might also be case for other action that I'm not aware of).

application route:

// app/pods/application/route.js
import Ember from 'ember';
import SimpleAuthApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';

export default Ember.Route.extend(SimpleAuthApplicationRouteMixin);

controller:

// app/pods/signin/controller.js
import Ember from 'ember';
import LoginControllerMixin from 'simple-auth/mixins/login-controller-mixin';

export default Ember.Controller.extend(LoginControllerMixin, {
  authenticator: 'simple-auth-authenticator:oauth2-password-grant'
});

signin template:

// app/pods/signin/template.hbs
<form {{action 'authenticate' on='submit'}}>
  {{input value=identification class="form-control" placeholder='Enter your email address' type='text'}}
  {{input value=password  class="form-control"  placeholder='Enter Password' type='password'}}
  <button type="submit" class="btn">Log in</button>
</form>
0

There are 0 best solutions below