AOG隐式帐户链接-如何重置? [英] AOG implicit account linking - How to reset?

查看:146
本文介绍了AOG隐式帐户链接-如何重置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个隐式帐户链接页面。我用AOG进行了测试-一切正常,已过表面检查,如果需要,用户已发送到电话应用程序,链接有效(状态为OK,存在accessToken)。



现在我不知道如何重设用户ID或帐户链接状态以重复此操作。不只是测试。由于许多其他原因,用户可能需要一个新令牌。



当前,如果我启动后续的SING_IN,它将立即返回OK和accessToken。

解决方案

如果您使用的是隐式OAuth流,则您的操作可以


I have setup an implicit account linking page. I tested it with AOG - all good, surface checked, user sent over to the phone app if needed, link worked (status OK, accessToken present).

Now I can't figure out how to reset the user id or the account linking status to repeat this. It's not just testing. The user could need a new token for many other reasons.

Currently if I initiate a subsequent SING_IN it comes back immediately with an OK and the accessToken.

解决方案

If you are using the Implict OAuth Flow, then your Action can revoke the token during webhook fulfillment. Instead of returning a normal response (for example, saying something using the actions-on-google library or by returning JOSN), your webhook should return an HTTP response code of 401. This will force the user to go through the login when next called. Exactly how you do this will depend on the library you're using.

When you're in production, in the listing of Actions users will see that their account has been linked to your Action and can unlink it.

这篇关于AOG隐式帐户链接-如何重置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆