Would it be possible for you to create a handler that does a 302 redirect to
a URL with a hash mark? That is: your full continue URL looks like:

continue=http://something.appspot.com/js_translate/some/uri/here

At that URI your handle converts that to:

continue=http://something.appspot.com#some/uri/here

On Fri, Apr 2, 2010 at 9:19 AM, Jay Young <[email protected]> wrote:

> I am writing a one-page AJAX driven site, meaning that every
> interesting part of my app's URL lives after the # mark, for example
> http://example.appspot.com/#/view/item/25/.  When a user logs in or
> out, I would like them to be redirected back to that address, so when
> they click login or logout, they are sent to a script on the server
> along with a 'referer' string.  The script generates the login/logout
> url via users.create_log(in|out)_url(referer).  This gives me a proper
> address with the correct "continue=..." value.  The script then
> redirects them to that login/out URL.
>
> The problem is that once the user follows through on the
> authentication page, they are redirected to the base URL for my app
> ("http://examples.appspot.com/";) even though the full "continue="
> parameter was "http://examples.appspot.com/#/view/item/25/";.  I
> suspect that the browser is terminating the "continue=" parameter at
> the hash mark, thinking it is trying to refer to a non-existent anchor
> on the current page.  Unfortunately, even escaping the hash mark in
> the create_login_url() function doesn't work, because then the Google
> Accounts page tries to redirect the user to "http://
> examples.appspot.com/%23/view/item/25", which is not correct, as the
> URL is never decoded.
>
> If the Google Accounts page could specifically check for that encoded
> hash mark and decode JUST that character before doing the redirect,
> this would work just fine.  As it stands, I have to live with
> redirecting users back to the base page of my app.
>
> Note:  I don't remember if '%23' is the proper encoding for '#'.  I
> was using Javascript's encodeURIComponent function in attempting to
> encode it, so I know it's not just a simple matter of using the wrong
> encoding.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
http://googleappengine.blogspot.com | http://twitter.com/app_engine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to