Force user to re-link their account

A very simple use case explaining my problem: given that my application is requesting contact for some interactions. Now the user gives me three times the wrong output. Then I want to reset his access and make him re-link his account. I can do this quite easily in my internal database, but I need a way to tell Google that its used token is already invalid. Else, the Google Assistant is resisting sending me a rejected token.

Update 2018-03-01 . With new built-in intentions / events, I also tried to send the event actions_intent_SIGN_INusing an attribute followupEvent, but this will only lead to a Google assistant remember my api using GOOGLE_ASSISTANT_WELCOME(with the old oauth .. marker) instead of restarting the sign in the workflow.


Original post

I have a google helper application with a dialog that forces the user to log in to use my application. The initial oauth workflow is working, and I get the token in all api calls.

Now I want to get the user to restart the account binding workflow under certain circumstances. To do this, I delete the oauth token from my internal database and send exactly this response to the user, which should correspond to the call app.askForSignIn()if you use sdk: https://github.com/actions-on-google/actions-on-google-nodejs/ blob / fe29016d472eeb1d080e2b575236076e9341199e / test / dialogflow-app-test.js # L1827

enter image description here

But that does not work. The helper does not tell the user to restart the oauth communication workflow and does not delete its stored oauth token. He does not even use it to update the token in order to get a new access token!

, "" ", ". - -.

( , , , contextOut. , , sdk sources, .)

+4
2

, Dialogflow reset 401.

Google API .

https://accounts.google.com/o/oauth2/revoke?token={token}.

.

. , Dialogflow reset . Dialogflow, , .

+1

, 401, DF. DF .

0

Source: https://habr.com/ru/post/1689572/


All Articles