arnaudleclerc / AzureMapsControl.Components

Razor Components for azure-maps-control
MIT License
34 stars 12 forks source link

Adding Community Links section #59

Closed ADefWebserver closed 2 years ago

ADefWebserver commented 2 years ago

Proposing to add a section where external Blogs and resources can be posted.

arnaudleclerc commented 2 years ago

Adding community links is a good idea, thanks ! I'll merge the PR.

I read the article to see what it was talking about, and I noticed you are using an AuthService to retrieve the token to use for AzureMaps, and that you are calling this method from the getTokenCallback extension. This library already supports an AAD Authentication by specifying the AadAppId and AadTenant` on the configuration like following. Out of curiosity, is there any reason you are not using it ?

services.AddAzureMapsControl(configuration => {
                configuration.AadAppId = "Your Aad App Id";
                configuration.AadTenant = "Your Aad Tenant";
                configuration.ClientId = "Your Client Id";
            });
ADefWebserver commented 2 years ago

@arnaudleclerc - Thank you for taking time to look at the code. I appreciate it. In my experimentation (I realize I could have incorrectly implemented things), when I did pass the AadAppId and AadTenant It required the user to log in, and the token was issued for the logged in user, and that user needed to be configured in IAM for the Azure Maps account. In my situation I did not want the user to have to log in. I wanted the token to be issued against the Azure Application Registration.

arnaudleclerc commented 2 years ago

The user having to log in is the expected behaviour. Your solution makes sense, thanks for the answer.