0

I'm trying to use OpenID with AppEngine, and I've setup a simple /_ah/login page for signing in with Google.

But it seems when I use users.create_login_url(dest_url='/some/page?foo=bar&fizz=buzz'), which returns:

https://myapp.appspot.com/_ah/login_redir?claimid=https://www.google.com/accounts/o8/id&continue=https://myapp.appspot.com/some/page?foo=bar&fizz=buzz

when eventually I'm redirected to the dest_url, the second parameter (fizz=buzz) is missing.

Is this a bug/limitation on create_login_url()?

4

1 回答 1

1

是的。这是联合登录中的一个错误。在此报告:https ://code.google.com/p/googleappengine/issues/detail?id=3249

解决方法:转义 & 符号两次

& -> %26 -> %2526

url ='/some/page?foo=bar&fizz=buzz'
import urllib    
url = urllib.quote(urllib.quote(url_re))
users.create_login_url(dest_url=url)

或替换&%2526.

于 2013-08-14T12:10:06.950 回答