I am working on VueJS SPA, which connects to Web API protected by Azure AD. I would like to implement the BFF Pattern(Backend for FrontEnd), which improve the security of the application where the token management happens on the server side. I could not find good examples using Azure AD identity. Appreciate if someone could share any good example that helps as a template for BFF using SPA framework.
1 Answer
Please check if below references can give an idea .
This demo will show implementation of SPA in Angular but this could easily be switched with Blazor, React or a Vue.js UI.
An API is created specially for the Angular UI and the other APIs can only be able to access from the trusted backend which can be under our control.
This is almost similar to the backend for frontend application architecture (BFF). The API uses Microsoft.Identity.Web to implement the Azure AD security. All API HTTP requests to this service require a valid access token which was created for the service.
References:
- asp.net - SPA (Vue), BFF and IdentityServer on IIS setup? - Stack Overflow
- Securing and accessing APIs with Azure Active Directory | by Cheranga Hatangala |
Other- references: