4
votes

Is it possible to have an ASP.NET Core 2 with Angular 5 and Azure AD Authentication? What I mean is implement the AD Auth using ASP.NET Core 2 and when the authentication is successful, then redirect to the Angular 5 app with some claims and tokens so that any calls to an ASP.NET Core API from Angular will include the authentication token/claims.

I know there is the ADAL angular wrapper you can actually implement the Azure AD Auth, but just wanted to know if my scenario could work...

1

1 Answers

2
votes

You can, I have an app doing that now. Basically your Angular frontend will redirect the user to login at Azure.. Azure will then redirect back to your angular app with the token. ADAL plugin should snag that token from the callback URL. You then make the API calls with the Token. The .Net Core backend will verify the token with Azure.

So think of it this way: User -> AngularApp -> Azure Login -> AngularApp w/token -> API Call to backend w/token -> API Backend verifies token with Azure each call