AOG implicit account linking - How to reset?

蹲街弑〆低调 提交于 2019-12-24 17:02:22

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/51600950/aog-implicit-account-linking-how-to-reset

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!