1

I've set up account linking with custom OAuth endpoints for Google Assistant (using Dialogflow) but can't find a way to sign a user out. There are no built-in actions to trigger sign out like there are for sign in (actions_intent_SIGN_IN) nor is there a way to empty out the "user" object containing their access token passed in each request to my webhook.

Has anyone found out how to manually unlink a user's account?

Similar question to Account Unlinking on Actions on Google but no feasible answer was provided.

roydenhawk
  • 11
  • 1

1 Answers1

1

At any time, you can return an HTTP 401 "Unauthorized" code and Google will consider the token invalid in the future. This is the equivalent of logging the user out".

(See here, but this is true for the Auth Code flow as well.)

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • This works, thanks. But it forces the app to close and Google to respond with " isn't responding right now. Try again soon.". Is there a way to gracefully handle the 401? – roydenhawk Aug 20 '18 at 20:10
  • @Arnaud - Do you have a reference for this? (I'm not disputing it, but this is the first I've heard of a problem.) – Prisoner Oct 10 '19 at 16:00
  • I've the issue on a project in production. After some emails with google teams a dev in charge of this project tell me that he is fixing the _bug_ of account **un**linking. I think in few months we will have an event to send to dialogflow or an API to call to make a correct account unlinking. – Arnaud Oct 16 '19 at 15:05