在GoogleOAuth2.0中有使用DialogFlow的示例代码吗?
应该有一个oauthcallback和令牌端点,但是我似乎找不到任何可以使用的代码。
这是为帐户链接授权url和令牌url。
发布于 2018-05-25 13:45:06
您将找不到回调和令牌端点的任何示例代码,因为它们实际上与对话框流无关。Dialogflow不提供这些服务,而是依赖底层消息传递服务(在本例中是Google上的操作)来实现身份验证或帐户链接。
在Google上的操作有非常广泛的认证/链接和基本身份选项,这取决于您的确切需求。你没有说你为什么要这么做,所以很难给你一个确切的答案。
- If you already have an OAuth server - fantastic! You're good to go.
- If you don't, you may want to look into something like [Auth0](http://auth0.com/) or [IdentityServer](http://identityserver.io/) to see if they meet your needs.
- Finally, Google has also given [instructions](https://developers.google.com/actions/identity/oauth2-code-flow) about creating your own OAuth server which will work with the Assistant. You can do this using the same platform you're building your webhook fulfillment on (for example, Firebase Hosting and Firebase Cloud Functions). Again, you won't find much sample code for this because each person's needs are different, but this provides some pseudo-code to discuss what you will need to implement.
https://stackoverflow.com/questions/50523922
复制相似问题