Python 2.7 has reached end of support
and will be deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Python
2.7 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you migrate to the latest supported version of Python.
Stay organized with collections
Save and categorize content based on your preferences.
The Users API provides functions for constructing URLs that allow the user to sign in or sign out,
then be redirected back to your application.
users.create_login_url()
and users.create_logout_url()
each take a destination URL for the application, and return a URL for signing in or signing out
that redirects back to the given URL afterward.
The development web server simulates Google Accounts using its own sign-in and sign-out facilities.
When you sign in to your application on the development web server, the server prompts you for an
email address to use for the session. See The
Development Web Server for more information.
Tip: An easy way to restrict access to a part of your application to
signed in users is to use the login: required configuration element for the URL handler.
See Configuring an App.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-21 UTC."],[[["\u003cp\u003eThe Users API provides functions to create URLs for user sign-in and sign-out actions, redirecting them back to your application afterward.\u003c/p\u003e\n"],["\u003cp\u003e\u003ca href=\"/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.users#google.appengine.api.users.create_login_url\"\u003e\u003ccode\u003eusers.create_login_url()\u003c/code\u003e\u003c/a\u003e generates a sign-in URL, while \u003ca href=\"/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.users#google.appengine.api.users.create_logout_url\"\u003e\u003ccode\u003eusers.create_logout_url()\u003c/code\u003e\u003c/a\u003e generates a sign-out URL, both returning users to a specified URL.\u003c/p\u003e\n"],["\u003cp\u003eThe development web server simulates Google Accounts by using its own sign-in and sign-out system, prompting users for an email address.\u003c/p\u003e\n"],["\u003cp\u003eThis API is for first-generation App Engine standard environment runtimes; migrating to App Engine Python 3 requires different options for legacy bundled services.\u003c/p\u003e\n"]]],[],null,[]]