简体   繁体   English

OAuth2 服务器 [Node.JS]

[英]OAuth2 server [Node.JS]

Which library can I use to implement OAuth2 authorization and refresh token in NodeJS for Google Smart Home Action?我可以使用哪个库在 NodeJS 中为 Google Smart Home Action 实现 OAuth2 授权和刷新令牌? I tried using passport-oauth2 and passport-google-oauth20 but cant get my desired results我尝试使用 passport-oauth2 和 passport-google-oauth20 但无法获得我想要的结果

The account linking guide indicates the features your OAuth server needs to implement in order to successfully link users of your smart home Action with Google. 帐户链接指南指出了您的 OAuth 服务器需要实现的功能,以便成功地将您的智能家居 Action 的用户与 Google 链接。 Mainly, you need have a server that implements the authorization and token exchange endpoints for the user accounts you maintain.主要是,您需要一个服务器来为您维护的用户帐户实现授权令牌交换端点。

The libraries you have mentioned seem to assist with implementing client-side authentication of requests based on various identity providers rather than an OAuth server.您提到的库似乎有助于实现基于各种身份提供者而不是 OAuth 服务器的请求的客户端身份验证 It seems the developer of Passport also maintains a companion package called OAuth2orize which may be able to help you.似乎 Passport 的开发人员还维护了一个名为OAuth2orize的伴侣 package,它可能会对您有所帮助。

NOTE: I cannot vouch for whether this library will seamlessly integrate with Google Assistant account linking.注意:我不能保证这个库是否会与 Google Assistant 帐户链接无缝集成。 Simply pointing out the infrastructure required for an OAuth server vs. client.只需指出 OAuth 服务器与客户端所需的基础架构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM