I have created a logout url with the users api: https://developers.google.com/appengine/docs/go/users/overview
But I only want it to disconnect them from my app, not log them out of their other Google services (Gmail etc). Is that possible?
You can't do this directly with the users API but see this question for alternative options:
Instead of using the UserService API to logout, you can manually remove the AppEngine specific cookies that are set. Check out this blog post that discusses how to so (written in Python, but you should be able to modify it for Java). This should effectively log the user out from your own app but not from other Google services (though I haven't tested this myself).
The more robust approach would be to create your own User class and manage your own session cookies, while wrapping the UserService API. The downside of this approach is the extra work that is required to set it up, compared to the very easy to use UserService API. However, the advantage of maintaining your own Users is that you will be able to use other methods of authentication besides for Google (e.g. now you will be able to use a Facebook login as well, or even a native login if you choose to set that up).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With