OAuth immediate failing all of a sudden

已查看 76 次
跳至第一个未读帖子

John Keating

未读,
2016年4月25日 22:29:402016/4/25
收件人 Google API JavaScript Client
Hi,

I've written an HTML app (in Cordova but all html/css/js files hosted externally) and have been successfully using the gapi.auth calls for months.

Within the last three days the gapi.auth call with "immediate: true" has begun giving an "immediate failed" error, but my code is unchanged.

The auth steps are as follows:

1. Use Firebase Google Oauth flow to authenticate the user and issue the Oauth token. Since Firebase tokens can remain valid for long periods of time, I'm able to avoid the auth popup altogether at app launch after the first time.
2. Call gapi.auth.authorize (with immediate: true) to set gapi's internal Oauth token. "authorize" has always known automatically that Oauth authorization was successful and successfully set the token. This part seems undocumented (I believe it's storing cookies for this) but has always worked.
3. Every 50 minutes, before the gapi token expires, I perform step 2 again to obtain a new token.

This has all been working well as the user only need enter their email credentials one time when the app is first installed and gapi.auth would successfully continue to authenticate and refresh indefinitely.  Now the only way I can get gapi to remain authorized is to present the Oauth popup again and require the user to enter their credentials.

Is anyone else having this problem or aware of any changes google made to this api?  Thanks.

john

John Keating

未读,
2016年5月12日 19:48:222016/5/12
收件人 Google API JavaScript Client
It started working again a few days later.  Ah the wonders of that must occur behind the curtain of Google tech.
回复全部
回复作者
转发
0 个新帖子