最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

openid connect - Duende BFF auth with node.js - Stack Overflow

programmeradmin1浏览0评论

I have implemented Duende BFF auth in already. But I wonder how I can achieve the same using node.js. I have a login site which uses Duende to recieve a cookie for all same-site domains, but my problem is I want to change my other BFF (client -> BFF -> micro services) to be i node.js. I am currently trying to implement the same using openid-client, but I cannot wrap my head around how the flow really is behind the scenes.

These are my services:

id.myapp -> handle all the userSession stuff with verifying the user etc

login.myapp -> handle login, use id.myapp to verify

bff.myapp -> use bffAuth with oidc flow from duende

Client flow:

Client (with cookie) -> read request to BFF which aggregates result from multiple services -> 2x services

I am currently also wondering if this may be secure enough:

Client (with cookie) -> BFF aggregator -> fetch user token from login.myapp -> 2x micro services.

I have implemented Duende BFF auth in already. But I wonder how I can achieve the same using node.js. I have a login site which uses Duende to recieve a cookie for all same-site domains, but my problem is I want to change my other BFF (client -> BFF -> micro services) to be i node.js. I am currently trying to implement the same using openid-client, but I cannot wrap my head around how the flow really is behind the scenes.

These are my services:

id.myapp -> handle all the userSession stuff with verifying the user etc

login.myapp -> handle login, use id.myapp to verify

bff.myapp -> use bffAuth with oidc flow from duende

Client flow:

Client (with cookie) -> read request to BFF which aggregates result from multiple services -> 2x services

I am currently also wondering if this may be secure enough:

Client (with cookie) -> BFF aggregator -> fetch user token from login.myapp -> 2x micro services.

Share Improve this question edited Feb 13 at 20:19 Dalija Prasnikar 28.6k46 gold badges94 silver badges175 bronze badges asked Jan 24 at 5:53 Erlend BettingErlend Betting 13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

In general, moving as much of possible of the authentication logic to the backend (BFF) is good! Keep the frontend as simple as possible, only using cookie authentication is best practice.

This is a good video on the topic alert‘OAuth 2 0’; // The impact of XSS on OAuth 2 0 in SPAs

发布评论

评论列表(0)

  1. 暂无评论