To enable Django OpenID authentication, I choose django-openid-auth. But when I deploy to dotcloud, there’s a ‘404’ as welcome message :p

My guess is the google openid server requests back long-length headers, which exceeds the default uwsgi buffer size (4096).There is a related issue about it. Although I didn’t find any “block size” in logs, but it seems worth a try. So I follow the documentation, modify my dotcloud.yml as:

and destroy the running server and deploy a new one (just as the document told me). Now the django service runs with OpenID authentication. 🙂

Bonus: to enable openid-auth for Django, add the following lines to:
urls.py

settings.py:

INSTALLED_APPS = (
# ...
'django_openid_auth',
#
)

AUTHENTICATION_BACKENDS = (
'django_openid_auth.auth.OpenIDBackend',
'django.contrib.auth.backends.ModelBackend',
)

# OpenID
OPENID_CREATE_USERS = True
OPENID_UPDATE_DETAILS_FROM_SREG = True
LOGIN_URL = '/openid/login/'
LOGIN_REDIRECT_URL = '/'
OPENID_SSO_SERVER_URL = 'https://www.google.com/accounts/o8/id'