admin管理员组文章数量:1336289
I am creating a Next.js web app that connects to an existing backend service to retrieve data. The backend service contains endpoints that require authentication (OAuth2 / Authorization header). There is a flow in which I could do this using the Next.js backend as a proxy (browser -> Next.js backend -> existing backend service). In this scenario, the backend has the user's auth token and adds it to the request to the backend service.
But this seems redundant. I want to call my backend service directly from the frontend using something like Axios in the frontend. Is this possible? How would I get the user's auth token in order to make this call to my backend service?
本文标签: oauth 20How to pass Authorization header from Nextjs app to backend serviceStack Overflow
版权声明:本文标题:oauth 2.0 - How to pass Authorization header from Next.js app to backend service? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742406512a2468932.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论