title: Logout from OAuth2 - Google App Engine/Python
body: <p>There is plenty of documentation on how to sign users in with OAuth2, but I haven't found any documentation as easily to sign a user out. Does anyone know how I can do this? I just want to sign the user out of my app, so another person can log in.</p>
  
  <p>Here is my log in code if that's helpful:</p>
  
  <pre><code>import jinja2
  import os
  import webapp2
  
  from apiclient.discovery import build
  from oauth2client.contrib.appengine import OAuth2Decorator
  from google.appengine.api import users
  
  
  decorator = OAuth2Decorator(
      client_id='',
      client_secret='',
      scope='https://www.googleapis.com/auth/userinfo.email')
  
  template_env = jinja2.Environment(
      loader=jinja2.FileSystemLoader(os.getcwd()))
  
  class LoginHandler(webapp2.RequestHandler):
      @decorator.oauth_required
      def get(self):
          user = users.get_current_user()
  
          template = template_env.get_template('index.html')
          context = {
               'user': user,
          }
  
          self.response.out.write(template.render(context))
  
  application = webapp2.WSGIApplication(
      [
       ('/login', LoginHandler),
       (decorator.callback_path, decorator.callback_handler())
      ],
      debug=True)
  </code></pre>