1小时后,带有Google Signin的AWS Cognito失败 [英] AWS Cognito with Google Signin fails after 1 hour

查看:97
本文介绍了1小时后,带有Google Signin的AWS Cognito失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了Google登录问题,这使我怀疑Cognito在这种配置下是否可以工作。

I am facing an issue with Google signin that makes me question that Cognito can work at all in this configuration.

基本上,Google令牌的寿命为1小时。
的目的是让您使用Google API一小时,然后您应该更新令牌。

Basically, Google token have a 1 hour lifespan. This is intended to give you access to the Google API for one hour and then you should renew the token.

问题是Cognito将此令牌与相同的寿命。因此,这意味着一小时后Cognito Sync停止工作(而且我还没有找到一种方法来静默刷新令牌甚至检查令牌是否过期)。

The issue is that Cognito uses this token with the same lifespan. So it means that after one hour Cognito Sync stops working (and I have not yet found a way to silently refresh the token or even check it is expired).

麻烦的是我的意思是我不想访问Googke API,我只想使用AWS Cognito Sync刷新我的数据集,由于Google令牌的原因,它不允许我使用。

What bothers me is that I do not want to access Googke API, I just want to refresh my datasets with AWS Cognito Sync and it would not let me because of the Google token. It does not really make sense.

我什至不想考虑在恶劣的网络条件下可能造成的混乱(令牌已消失并且无法刷新,因为用户确实没有连接...用户被可用的应用程序卡住...用户非常不开心...)。

I do not even want to think about the mess it could be in poor network conditions (token is elapsed and cannot be refreshed because user does not have connectivity... user stuck with an usable app... user very unhappy...).

我想知道为什么服务器端尚未实现令牌(如 https://developers.google.com/identity/sign -in / android / offline-access )。
我们将从Google获得身份验证代码,然后Cognito服务器将处理令牌本身。

I am wondering why this has not been implemented with server side token (as in https://developers.google.com/identity/sign-in/android/offline-access). We would get the auth code from Google and then the Cognito servers would deal with the token itself.

我仍然希望我做错了什么,那它是完美无瑕的,但是我已经用光了……

I still hope that I am doing something wrong and that it is flawless, but I have run out of things ti try...

欢迎任何提示,谢谢!

JM

推荐答案

即使您没有连接,Cognito Sync也会在本地存储数据并在网络连接时同步可用。这样可以防止由于网络问题而造成任何数据丢失。

Even if you do not have connectivity, Cognito Sync will store your data locally and sync when the network connection is available. This will prevent any loss of data because of network issues.

关于Google令牌,是的,您必须刷新它们并在当前的AWS凭证上为Cognito提供一个新的令牌。设备到期。

Regarding Google tokens, yes you have to refresh them and give Cognito a new one when the current AWS credentials on the device expire.

这篇关于1小时后,带有Google Signin的AWS Cognito失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆