Closed GoogleCodeExporter closed 9 years ago
Original comment by pele...@google.com
on 9 May 2014 at 2:19
Hi Eyal,
Thanks for reply. I am the same questioner who asked you for help on
stackoverflow.
link :
http://stackoverflow.com/questions/23440598/google-oauth-api-sign-out-issue-in-g
oogle-api-dot-net-client/
As suggest by Rohit in stackoverflow, On logout I clear the cookies after
calling revoke token webservice. Now when try to get the credential, it is not
asking me for the user credentials. Somehow It retrieves a UserCredential class
with token (even if this toekn is revoked). So, this token is useless for the
next call to retrieve the youtube feeds where I require to pass it as
parameter. This is only happening with the same instance of the application.
When I restart the application after logout process. It is working fine for me.
For more detail, I am using same "user" for all calls to get the UserCredential
in 'GoogleWebAuthorizationBroker.AuthorizeAsync()' method.
Original comment by java.web...@gmail.com
on 10 May 2014 at 4:48
Try to use a different "user" (and not the same one) meantime.
Let me know if it works
On Sat, May 10, 2014 at 12:48 AM,
<google-api-dotnet-client@googlecode.com>wrote:
Original comment by pele...@google.com
on 10 May 2014 at 7:04
https://codereview.appspot.com/94340043/
Original comment by pele...@google.com
on 10 May 2014 at 8:25
Original comment by pele...@google.com
on 14 May 2014 at 3:46
Has this been put in a to a release yet? I, too, would like to use this.
If not, any idea on a timeframe?
Thanks
Original comment by bc3t...@gmail.com
on 25 Aug 2014 at 9:26
It is part of release 1.8.2.
It's out there, and ready for you to use it :)
Original comment by pele...@google.com
on 25 Aug 2014 at 9:29
I can't seem to make heads or tails out of the API, then, to figure out how I'm
supposed to revoke one's token after, say, a close and re-launch of the app. I
see, via an Isolated Storage Explorer, that there is data stored by Google in
the local data store, but don't know how I'm supposed to load the token from
that store, to subsequently hand it off to a revoke method.
Any doco out there? I can't seem to locate any.
Original comment by bc3t...@gmail.com
on 25 Aug 2014 at 9:33
I don't know that I would mark this complete just yet.
You can't clear a token and then re-auth in a manner that prompts the user for
a username & password again. In order to do this the cookies on the browser
control must be cleared, and that's not being done. Revoke the token, exit the
app, re-launch and yup you'll get prompted again, but obviously this is not
ideal.
Similarly, code for revoking a token is somewhat complicated since we can't
serialize UserCredential objects to storage, only Token objects. If we could,
then we could just re-hydrate that object to make it easier.
Original comment by bc3t...@gmail.com
on 26 Aug 2014 at 3:19
Take a look in this change -
https://code.google.com/p/google-api-dotnet-client/source/detail?r=3dc4887c229fa
263ee147de9bd58f8502e7a9a8c
If you want to revoke the token by using -
https://code.google.com/p/google-api-dotnet-client/source/browse/Src/GoogleApis.
Auth/OAuth2/UserCredential.cs?spec=svn3dc4887c229fa263ee147de9bd58f8502e7a9a8c&r
=3dc4887c229fa263ee147de9bd58f8502e7a9a8c#173
then the user won't be able to use the current access token, so in order to
reauthorize it, you should use one of the ReauthirzeToken methods (
https://code.google.com/p/google-api-dotnet-client/source/browse/Src/GoogleApis.
Auth.DotNet4/OAuth2/GoogleWebAuthorizationBroker.cs?spec=svn3dc4887c229fa263ee14
7de9bd58f8502e7a9a8c&r=3dc4887c229fa263ee147de9bd58f8502e7a9a8c#99
).
What do you think that this solution is missing?
Original comment by pele...@google.com
on 27 Aug 2014 at 3:24
It's missing the clearing of cookies from the embedded browser. Without this,
the reauth simply pops up "Authorize application" page, not the google login
page which is required if a user wishes to sign out and sign back in under a
different account
Original comment by bc3t...@gmail.com
on 28 Aug 2014 at 6:35
Similarly, these are both painful as we don't have a way of serializing the
UserCredentials object to (easily) re-hydrate it to issue the revoke or the
reauth. Being able to serialize user creds much like we can serialize tokens
would go a long way here.
Original comment by bc3t...@gmail.com
on 28 Aug 2014 at 6:38
can you provide any advice to devs as to how to go about solving the problems
i've outlined above?
Original comment by bc3t...@gmail.com
on 11 Sep 2014 at 12:46
As I understand on the "Authorize application" page you can change your
Google's user, right?
Can you printscreen the page you are referring to?
Original comment by pele...@google.com
on 11 Sep 2014 at 1:32
No. on the auth application page all you get are "ok" and "deny"
Sorry for my delayed response. These google group/issue things never work well
for me as far as notifications go.
I will work with this some more and show you what I am experiencing with
screenshots. If i find that things are working better now, I will also update
accordingly.
Original comment by bc3t...@gmail.com
on 13 Nov 2014 at 1:55
But I think that you can still change the user in that page (not sure)
anyway it's a browser issue that you actually see...
On Thu, Nov 13, 2014 at 8:55 AM, <google-api-dotnet-client@googlecode.com>
wrote:
Original comment by pele...@google.com
on 13 Nov 2014 at 2:13
Agree it's a browser issue, but it's an assue because - as i said - you can't
clear the cookies in the embedded browser the Google SDK is using. Then Signout
happens, you should be issuing the command, and clearing the cookies of that
browser object. I'd be doing it myself but the source for the Youtube libraries
doesn't appear to exist anywhere, only the core APIs for Google .Net.
Original comment by bc3t...@gmail.com
on 13 Nov 2014 at 3:21
And, not to be too crass, but shouldn't you be "sure" before you tell me i can
do it?
Original comment by bc3t...@gmail.com
on 13 Nov 2014 at 3:29
Original issue reported on code.google.com by
pele...@google.com
on 8 May 2014 at 4:51