Forum OpenACS Q&A: WAP users not getting logged in

Collapse
Posted by Walter Smith on
I'm having trouble getting WAP users logged in so their user ID's can be verified. The problem occurs on code backported from the WAP module in ACS Classic 3.9(?) to OACS 3.2.5.

Using log notices to debug, I see that the initial call to log in the user is completing successfully, as their user ID can be verified from the login page using ad_verify_and_get_user_id, immediately after it executes ad_user_login -forever t $db $user_id. However, as soon as they are redirected to one of the other pages they can no longer be verified as being logged in.

Using the OpenWave simulator, I can see that the usual cookies are getting written to the device, although I have little knowledge of how this works on wireless devices.

The pages are restricted using wap_maybe_redirect_for_registration, which makes a call to ad_verify_and_get_user_id to see if the user is logged in. On any page after the login page, the user ID is returned as "0", sending them in a circle. This can get pretty boring after 10 or 12 tries, especially with those convenient cell phone keypads.

Has anyone else wrestled with this? TIA for any help, suggestions, or commiseration.

Collapse
Posted by Peter Harper on
Walter, although I can't really suggest what the problem is with the
simulator you're using, I can tell you that cookies are normally handled
by the WAP gateway rather than on the WAP device.  So essentially
the gateway manages a devices cookies on its behalf.
Collapse
Posted by Walter Smith on
Thanks Peter.  I didn't realize that, although I've verified that the service I'm testing on (Sprint PCS) supports cookies on their gateway.

I don't know why I didn't realize it before, but the session ID seems to be changing on every page visited by the cell phone.  I assume this is not correct behavior, and that it means that the login information is not being properly stored.

Anyone have any thoughts on why each page hit would be producing a new session ID or how to resolve the problem?