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

回避策: アンパサンドを 2 回エスケープします。

& -> %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 に答える