sureshchahal / angular2-adal

Angular 2 wrapper for adal.js
MIT License
41 stars 50 forks source link

login success callback or event #47

Open artparks opened 7 years ago

artparks commented 7 years ago

The angularjs ADAL implementation would fire an event on $rootScope, (something like 'adal:loginSuccess') which was pretty useful to listen to for getting the user info (name, etc) when it was available. What would be the equivalent technique here? is there any way of registering a callback with the underlying adal library?

rjwijnen commented 7 years ago

At this time i am Turing to do something to sessionstorage value for the key 'adal.error' is equal to 'login_required' then go back to the login route/component. This check i added to the login quard and every error part of the service.