benbaran / adal-angular4

Angular 4/5/6/7 ADAL Wrapper
MIT License
86 stars 104 forks source link

[Question] How to get the access token after login() #46

Closed HighSoftWare96 closed 6 years ago

HighSoftWare96 commented 6 years ago

How can we have access to the acess token given by the aad API after the user has logged in (I've used the login module)? I've seen that the token is passed trough the redirect url as an hash called 'id_token', is that safe? Have I to retrieve that within the url or there are some methods that allow me to access this returned token?

HighSoftWare96 commented 6 years ago

I've solved using handleCallbackWindow() subscription in the window of the login success redirect.