Skip to content

Instantly share code, notes, and snippets.

@jeremydw
Created December 12, 2017 06:17
Show Gist options
  • Save jeremydw/42139a15f2fc802d3bddeab95b64b646 to your computer and use it in GitHub Desktop.
Save jeremydw/42139a15f2fc802d3bddeab95b64b646 to your computer and use it in GitHub Desktop.
Enforce account chooser on Google App Engine
When using the Google App Engine Users API, there is no way to enforce the account chooser for users signed in to multiple accounts. You can do so by using `users.create_login_url` and replacing the output of the function as so:
```
from google.appengine.api import users
url = users.create_login_url()
url = url.replace('/accounts/ServiceLogin', '/a/SelectSession', 1)
```
This is not guaranteed to work if the output of `users.create_login_url` changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment