manishrasrani / ms-adal-angular6

This is a wrapper library for Angular 6+ (Angular 6.X.X and Angular 7.X.X) modules over Microsoft ADAL (Azure Active Directory Authentication Library)
https://www.npmjs.com/package/microsoft-adal-angular6
MIT License
34 stars 13 forks source link

After authentication, how to access the URL ID, inside the redirectURL #41

Open babupca opened 4 years ago

babupca commented 4 years ago

I'm using ms-adal-angular6 with in our newly developing company portal. We are able to authenticate the user using ms adal.

But we have a problem., our application is about creating client visits using online portal, so whenever we create a visit, the user will be getting the email and from the email they will have click the link and directly open the application (to check the current state of the visit).

If the user is already authenticated means, the URL which he clicked will open directly to the target visit state module, Otherwise, first he has to be authenticated, then he has to be redirected to the appropriate page. In order to redirect to the exact state, i would need the ID in the URL, which he clicked in the email.

But the problem is after authenticated, I could not able to get the URL Id ( Please check the URL below), which will be exactly similar.

If i get the id, I will pass the ID to the service to identify the current state of the visit and form the URL and redirect accordingly.

Here is the URL. https://companyvisits.azurewebsites.net/myvisit/visit/**1e6bf45c-02d1-4d0c-aa1f-621ecc03576e**

Please help us to give some solution, for my problem.

Thank You.

ChristofFritz commented 4 years ago

Hi, I had the same issue with a web-app for a customer. I couldn't fix it with this library and had to wait for the official msal-angular library from microsoft to be updated. The library has been updated, so I'd suggest using it. => https://www.npmjs.com/package/@azure/msal-angular

The switch is really easy, I did it just two days ago.