OAuth immediate failing all of a sudden

76 προβολές
Παράβλεψη και μετάβαση στο πρώτο μη αναγνωσμένο μήνυμα

John Keating

μη αναγνωσμένη,
25 Απρ 2016, 10:29:40 μ.μ.25/4/16
ως 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

μη αναγνωσμένη,
12 Μαΐ 2016, 7:48:22 μ.μ.12/5/16
ως 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 νέα μηνύματα