更新问题:我想使用 oauth2 请求在 NodeJs 中对用户进行身份验证,但我无法在网络上找到相关文章。
Twitter 和大多数网络上的人都使用 oauth 1 进行身份验证,我不想使用快速 session 中间件,而且我很想知道当用户没有 passport 策略时我们如何使用 oauth 对用户进行身份验证等等。
有人可以帮我弄清楚我们如何使用他们的文档(使用代码和可能的 axios)在 Twitter 中对用户进行身份验证吗?
最佳答案
目前无法使用 OAuth2 验证用户。在您链接到的文档页面上(详细说明 POST oauth2/token
)
Allows a registered application to obtain an OAuth 2 Bearer Token, which can be used to make API requests on an application's own behalf, without a user context. This is called Application-only authentication.
(强调我的)
关于javascript - 向 twitter api 发出 Oauth2 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57035099/