简体   繁体   English

在使用 oAuth 使用 Unity Loca 和 Google 表格时。谷歌 API 在被多个用户使用时不断撤销访问权限

[英]While working with Unity Loca and Google Sheets using oAuth. Google API keeps revoking Access when used by multiple users

I started recently to work with the Google API to use google Sheets for our Localization in Unity.我最近开始与 Google API 合作,使用 google Sheets 在 Unity 中进行本地化。 It seems to work as needed until i invited more team members to work on and with the sheet.在我邀请更多团队成员处理工作表之前,它似乎可以按需工作。 The goal is that a localization team works with the sheet and we pull it every now and then to the unity project.目标是本地化团队使用工作表,我们不时将其拉到统一项目中。

But the API started to revoke my access to the sheet.但是 API 开始撤销我对该表的访问权限。 Only one team member can work on the sheet right now and all the others geht the "Revoke Token Access" message in Unity.现在只有一名团队成员可以在工作表上工作,其他所有成员都在 Unity 中收到“撤销令牌访问”消息。 After some research here i found out that the token are only working for some time when the Product is still in the thestphase on the google side, which is the case.在这里进行一些研究后,我发现令牌仅在产品仍处于谷歌方面的最后阶段时才工作一段时间,情况就是这样。

But even when i create a new Token on the google side i still can't pull or push new data to the sheet and get the same error.但是即使我在谷歌端创建了一个新的令牌,我仍然无法将新数据拉或推到工作表并得到同样的错误。

I created a new authorization with a fresh token and gave a few members administration rights to avoid this problem.我用新的令牌创建了一个新的授权,并赋予了一些成员管理权限以避免这个问题。 It did not work.它不起作用。

Applications in the testing phase, have their refresh tokens expired after seven days.处于测试阶段的应用程序的刷新令牌会在 7 天后过期。

在此处输入图像描述

What bothers me about what you say is happening is that if someone is using the sheet and someone else tries to at the same the the second person will get that its expired.你所说的事情让我困扰的是,如果有人正在使用这张纸,而其他人试图同时使用,那么第二个人会得到它已过期。 Assuming that your over writing the refresh token with the newest one every time this should not happen.假设您每次都用最新的刷新令牌覆盖刷新令牌,这不应该发生。 When you request a new access token using a refresh token sometimes the authorization server will return to you a new refresh token.当您使用刷新令牌请求新的访问令牌时,授权服务器有时会返回给您一个新的刷新令牌。 If it does you need to ensure that you always store the latest refresh token as you can only have 50 outstanding refresh tokens before the older ones start to expire.如果确实如此,您需要确保始终存储最新的刷新令牌,因为在较旧的刷新令牌开始过期之前,您只能拥有 50 个未完成的刷新令牌。

I will need to see your code before i can help more.我需要先查看您的代码,然后才能提供更多帮助。

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

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