简体   繁体   English

从谷歌上的操作中注销用户

[英]Logout the user from actions on google

Is there any way to logout Or switch the account in actions on google?有什么办法可以注销或在谷歌操作中切换帐户? I am using account linking with Google (OAuth and Google SignIn) I want to do something like this that if the user says "Logout me from this account OR switch to another account", the action should logout him and open the google authentication.我正在使用与谷歌(OAuth 和谷歌登录)链接的帐户我想做这样的事情,如果用户说“从这个帐户注销我或切换到另一个帐户”,操作应该注销他并打开谷歌身份验证。

I saw some of the Helpers intent in the documentation but not found any Helper for signout/logout.我在文档中看到了一些 Helpers 意图,但没有找到任何用于注销/注销的 Helper。

Could you please help me that how can I logout the user by saying "logout from account or switch to another account"你能帮我说一下“从帐户注销或切换到另一个帐户”来注销用户吗?

Keep in mind that "Account Linking" isn't really logging in. It is connecting the Google Assistant account they're using to the account you use on your system.请记住,“帐户关联”并不是真正的登录。它是将他们正在使用的 Google 助理帐户连接到您在系统上使用的帐户。 If you're using just Google Sign In for Assistant, then you just want access to the information about the account they're using.如果您只使用 Google Sign In for Assistant,那么您只想访问有关他们正在使用的帐户的信息。

So "logging out" isn't quite what you're asking to do.因此,“注销”并不是您要执行的操作。 In the first case, you want to "unlink" their Assistant account from the account on your system.在第一种情况下,您希望将他们的 Google 助理帐户与您系统上的帐户“取消关联”。 In the second case, you want to forget who they are.在第二种情况下,您想忘记他们是谁。

To do the "unlinking", you can return HTTP code 401 "Unauthorized".要进行“取消链接”,您可以返回 HTTP 代码 401“未授权”。 This will force the Assistant to discard any tokens they have for the user.这将强制助手丢弃他们为用户拥有的任何令牌。 Users can also do the unlinking through your directory listing.用户还可以通过您的目录列表取消链接。

Forgetting who they are is more difficult.忘记他们是谁更难。 There is nothing in AoG that does this directly, although you can direct them to a page that calls the sign out method for Google Sign In. AoG 中没有任何东西可以直接执行此操作,尽管您可以将它们定向到调用 Google 登录的注销方法的页面。 They can also do the unlinking through the directory listing or through Google's account management page.他们还可以通过目录列表或 Google 的帐户管理页面取消链接。

Account linking can be turned off by clicking at that account logo below in case you want to test the intent again and redirected to sign in automatically every time.如果您想再次测试意图并重定向为每次自动登录,可以通过单击下面的帐户徽标来关闭帐户链接。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM