Friday, September 10, 2010

Re: Getting ACSID cookie in web mode

On Sep 10, 4:28 pm, mma <marco.m.al...@gmail.com> wrote:
> Hi there,
>
> I'm implementing an auto-login method for google users, where if a
> user is already logged in the GWT App won't show the welcome page and
> will go directly to the "page" that is relevant for that particular
> user. If the user is not logged in, the App will show the welcome page
> and ask to login.
>
> To do the auto-login part, I would expect to check if the cookie that
> the GAE User Service sets is present or not - the cookie name seems to
> be "ACSID".
>
> However, the code    GmailLoginCookie = Cookies.getCookie("ACSID");
> results in 'undefined' even if the cookie is present. The code seems
> to work fine in dev mode.
>
> Is there any error with my approach or any bug with the Cookies class?

Maybe the cookie is "HttpOnly"?

> Any ideas?

How about generating (JSP for instance) the HTML host page of your GWT
app with the needed info, and from your GWT app's entrypoint just read
that info (using Dictionary or a bit of JSNI) to choose which "page"
to show?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment