0

I am calling login() where I need to initialize a value to one adalService function init(configOptions: adal.Config): void; which will set default url value So , after login() or logout() it can redirect to the stored redirect value in init()

and second function is also of adalService login(): void; which will do Azure AD login and redirect to value set in by init().

So, when I am running outer function() before calling init() only login() is working which redirects to me previously stored value(previous route) 90% of the time

So, I want the fist function init() to complete, then to execute 2nd function login(). Both are void() otherwise I would have used Observable and write in response body

Can I convert my normal function to Observable or something. If yes, please write syntax too

login()
{
  this.adalService.init(environment.adalConfig);
  // console.log('url :- ' + environment.adalConfig.postLogoutRedirectUri);
  this.adalService.login();
}
Satish Patro
  • 3,645
  • 2
  • 27
  • 53

0 Answers0