Is it possible to test Google App Engine OpenID authentication on development Server?

折月煮酒 提交于 2019-12-12 11:27:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!