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

node.js - Why can't I access to facebook.com.well-knownoauthopenidjwks from NodeJS server? - Stack Overflow

programmeradmin0浏览0评论

In order to validate some JWT from Facebook, I need to access to their public keys.

I'm running this code on my backend, and it returns an HTML with something like a "404 page", but, if I access it on my browser, is just works.

response = await fetch('/.well-known/oauth/openid/jwks/', {
  method: 'GET',
  redirect: 'follow',
  follow: 100,
  headers: {
    Accept: 'application/json',
    'Cache-Control': 'no-cache',
    'Content-Type': 'application/json',
  },
}).then(r => r.json());

Can you spot any issue there?

Why is Facebook blocking my calls? Is there another way to do this?

I need to access to those public keys because I want to validate the AuthenticationToken coming from a "Login with Facebook" flow

发布评论

评论列表(0)

  1. 暂无评论