When attempting to access authenticated information console.log(this.get('session.data.authenticated.userEmail')) => undefined
from the controller or route it never seems to work when off of events like didTransition
or afterRender
. But is accessible on button click actions. Is there some event i’m missing (Like some afterAuth) for the token to be accessible? I’ve been stuck on this for weeks and have just been avoiding it.
actions{
didTransition: function (){
Ember.run.schedule('afterRender', this, function () {
console.log(this.get('session.data.authenticated.userEmail') //returns undefined (Works fine off button clicks)
})
}
}
Aucun commentaire:
Enregistrer un commentaire