Aspnetcore: Question: AAD Authentication integration sample/ advice

Created on 25 Apr 2018  路  8Comments  路  Source: dotnet/aspnetcore

Is there any reference material on integrating Azure Active Directory for authentication into the Blazor framework?

Similar, presumably, to ADAL.JS?

area-blazor

Most helpful comment

As an update, it took about 20mins to integrate and get that library working.

All 8 comments

At this stage no, there's nothing specific - sorry! It's too early. However it should be possible to integrate any existing JS solution via the JS interop APIs.

Cool, I'll give that a go. Thanks.

As an update, it took about 20mins to integrate and get that library working.

Nice! Is this code someplace that you can share?

@danroth27 It's not, but I'll pull a sample together over the next day or so and link it here.

Although, it's worth pointing out that it's almost entirely JS based.

@danroth27 Here's a quick and dirty sample, instructions in the read me!

@danroth27 Here's a quick and dirty sample, instructions in the read me!

Very cool! @blowdart @SaeedAkhter-MSFT it would be great if you guys could take a look and review this usage of adal.js from a Blazor app.

I have here more complete sample: gpeipman/BlazorDemo.

BlazorDemo.AdalClient project has the following features:

  • adaljs for Azure AD integration
  • automatic authentication
  • Azure Functions backend (Azure AD authentication is supported by code)
  • data manipulation in Blazor using fresh tokens provided by adaljs
  • thin JavaScript interop for getting tokens
  • project runs also on Azure Storage static websites

Blog post and updated project description at GitHub will come in the beginning of next week.

@SteveSandersonMS Is there any danger on dragging unmarshalled C# actions to JS interop and then back to Blazor again?

Was this page helpful?
0 / 5 - 0 ratings