kalleantero / kalleantero.github.io

0 stars 0 forks source link

https://www.kallemarjokorpi.fi/blog/how-to-build-micro-frontend-architecture-and-bff.html #20

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

How to build Micro-Frontend Architecture with Web Components and BFF (part 1/2)? - Blog by Kalle Marjokorpi

This blog is concentrated to Microsoft and cloud technology, coding and architecture. Solutions, tips and knowledge from a developer to developer.

https://www.kallemarjokorpi.fi/blog/how-to-build-micro-frontend-architecture-and-bff.html

kostiapl commented 1 year ago

Great article! Especially from the security point of view. The one question that may arise here is that "Do we need to create separate OIDC client on OAuth/OIDC server for each microfrontend?"

kalleantero commented 1 year ago

Great article! Especially from the security point of view. The one question that may arise here is that "Do we need to create separate OIDC client on OAuth/OIDC server for each microfrontend?"

Thanks! I would say that a single OIDC client for the main hosting web application is enough if I understood your question correctly. OIDC client of the main web application is responsible for retrieving the bearer token of the user from the OIDC server during authentication. That bearer token (inside the cookie) is passed via BFF to micro-fronted specific APIs. Note! that passing the bearer token to micro-frontend APIs will grant access to all scopes which determined in the user's bearer token.