Is it possible to test Google App Engine OpenID au

2019-06-21 04:31发布

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条回答
做个烂人
2楼-- · 2019-06-21 05:07

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.

查看更多
登录 后发表回答