Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example of "Blazor Web Hybrid App + Web API" #375

Open
shushu789 opened this issue Oct 21, 2024 · 6 comments
Open

Add an example of "Blazor Web Hybrid App + Web API" #375

shushu789 opened this issue Oct 21, 2024 · 6 comments
Assignees
Labels
Enhancement New feature or request

Comments

@shushu789
Copy link

Hello, could you please add an example of a "Blazor Web Hybrid App + Web API"? I am a beginner with Blazor Web Hybrid apps, and I am currently unfamiliar with how to call a Web API. What I tmean is that I am not sure how to best integrate a Web API into the hybrid app solution.
thanks

@shushu789 shushu789 added the Not triaged Awaiting review label Oct 21, 2024
@guardrex
Copy link
Collaborator

Looping in @BethMassi so she sees this 👀.

This will probably happen when an existing (security) issue is worked. We still need to confirm and update our security guidance in ...

https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/security/?view=aspnetcore-8.0&pivots=maui

... and probably place a security-enabled (Microsoft Entra ID) MauiBlazorWeb app into this samples repo.

I hope to reach it very soon ... this week would be nice.

After confirming and updating security guidance (and probably showing app roles, Azure roles, and Azure security groups working, too), I can also demonstrate a secure web API backend.

In the meantime, we have separate coverage ...

Let's leave this issue open for now as a reminder to me. Again, I hope to work on this whole subject this week 🤞🍀. I'll see if my schedule is clear for tomorrow (Tuesday) morning to give it a another shot, as my first attempt a few weeks ago didn't go well ... the 😈 got me on that attempt 😄.

@guardrex guardrex added Enhancement New feature or request and removed Not triaged Awaiting review labels Oct 21, 2024
@guardrex
Copy link
Collaborator

I had good luck this morning with the in-the-BlazorWebView approach. I'm able to implement that approach successfully. However, I still think that the MSAL implementation should be handled by the PU (i.e., "product unit") because things get murky looking at MSAL docs in relation to the solution. I sent a message to Beth to discuss it. I'll report back later.

@shushu789
Copy link
Author

Hi, any progress on adding a sample project that uses ".NET MAUI Blazor Hybrid and Web App + Web API"? .NET 9 has now been officially released, and it provides a new "maui-blazor-web" template for creating hybrid applications. However, our sample repository currently doesn't offer an example that integrates a Web API with a hybrid app. I’m really looking forward to this example. Thank you for your hard work!

@guardrex
Copy link
Collaborator

guardrex commented Nov 14, 2024

No progress YET ... I'm still working on 9.0 content for the 9.0 framework. I also have a high priority security work item for WASM+Identity, namely account confirmation and password recovery followed by 2FA/TOTP. I also have a slew of open PRs that we need to get over the finish line.

I still think that before web API is addressed (or at the same time) that security generally should be addressed for the new template. I wasn't able to get it to work on two earlier attempts because I'm not very familiar with desktop/mobile/MAUI. I'm more of a web dev; so when strange errors 👽 crop up when compiling, I'm really at a bit of a loss on how to address them. It's true tho that with 9.0 out that I should try security again with the new template and see how it goes for a third time 😩.

I'll leave your message in my Inbox and see if I can find time next week to work on it again. No promises tho ... I'm just a small green dinosaur 🦖 in a sea of Blazor documentation 😆. High priority items land all the time during releases, and I might get hit with tasks that vaporize my time.

@BethMassi
Copy link

@guardrex Now that we're up for air after the release I'm going to get together with our Auth PM and work on a plan for some guidance here. There are a lot of IAM providers so we should prioritize which ones we tackle. Sounds like ASP.NET Identity and Microsoft Entra ID are P0.

@guardrex
Copy link
Collaborator

guardrex commented Nov 14, 2024

I can write an article from a sample if they don't produce article content. It's a bit quicker tho if they do write up basics. They definitely should call out gotchas 😈 with notes where needed ... things that a 🦖 wouldn't be aware of to place in an article.

If they add a secure web API, that would be great. Bonus points if they design it with app roles and Graph for Azure built-in Admin roles and security groups. That's been a common ask over the years for auth-enabled Azure-based samples. If the sample isn't set up for those features, I usually 🤞🍀 can work out the guidance for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants