Turns out there is a clearAllTokens() method from Auth.
On Monday, November 26, 2012 6:22:29 PM UTC-8, Allen Zhou wrote:
Hi, I ran into an issue with using https://code.google.com/p/gwt-oauth2/source/browse/ trunk/samples/multi/com/ google/api/gwt/oauth2/samples/ multi/client/ OAuth2SampleEntryPoint.java for a specific use case.The login method, as described below, will not open a popup window if my token not close to expiring yet. So so if I revoked access to my application (from my Google Account > Security > Authorizing applications and sites), the login method does not open the popup window to prompt to to re-grant access, instead it just gives me back the existing token (since it has not expired yet). And now, when I try to use that token to make requests to Google API, these requests will fail because I revoked access, so the token is invalid.Now, my question is, how do I make the login method from this client to force open the popup window to prompt user to grant access again?public void login(AuthRequest req, Callback<String,Throwable>callback)
- Request an access token from an OAuth 2.0 provider.
If it can be determined that the user has already granted access, and the token has not yet expired, and that the token will not expire soon, the existing token will be passed to the callback.
Otherwise, a popup window will be displayed which may prompt the user to grant access. If the user has already granted access the popup will immediately close and the token will be passed to the callback. If access hasn't been granted, the user will be prompted, and when they grant, the token will be passed to the callback.
- Parameters:
req
- Request for authentication.callback
- Callback to pass the token to when access has been granted.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/gtAs7u4jn6QJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment