问题
I'm trying OpenID support for Google App Engine on a small project i have on my machine but when i call:
users.create_login_url(federated_identity = provider_url)
i get this error:
google_appengine/google/appengine/api/user_service_pb.py", line 178, in ByteSize
n += self.lengthString(len(self.destination_url_))
TypeError: object of type 'NoneType' has no len()
provider_url is https://www.google.com/accounts/o8/id
any clue?
回答1:
You should normally pass a dest_url
parameter to create_login_url
, unless you're certain that there is a "current request" whose url you want to use instead. Apparently, the latter condition does not obtain, so the destination url stays None
, which causes the problem you're observing. Passing an explicit dest_url
should fix it.
来源:https://stackoverflow.com/questions/3489488/is-it-possible-to-test-google-app-engine-openid-authentication-on-development-se