We've been having an issue when building Flash apps and testing from inside Flash itself of the server not remembering the user logged in from Flash. For example, we make a system.connect() call followed by a user.login(), both returning sessid's and user objects successfully. After the successful user.login() we make a call to a custom method that uses 'global $user;' but the provided user object is for an anonymous user and not the one that we logged in. The calls and everything work as intended when the Flash file is uploaded to the server, just not from inside the Flash app. Any thoughts or ideas?

Comments

snelson’s picture

Far as I know, Flash IDE can't store cookies, so your session is being seen as new on every request. I usually move my testing to the browser when I get to this kind of functionality in an app. You could also enable the session ID param.

Scott

greenskin’s picture

We have the API Key and Session ID params enabled, the best that I can tell, services doesn't seem to look at the given Session ID. At least when I use a different Session ID on one of the methods at /admin/build/services, it still uses my own Session and not the one of the ID I gave the method.

snowball43’s picture

Priority: Normal » Critical

Not entirely sure if this is a Services issue or not, but we seem to have an issue not remembering the user between drupal and flash even when the flash file is loaded in the browser. In other words, when logged in via flash at http://example.com/flash then navigate via browser address bar to http://example.com/user, it presents the login form where it should remember that you already logged in via the session id gained from services in flash. Currently this works on our dev server but not our live server, not sure what might be missing on our live server or installed that is causing this issue. Any help would be fantastic.

snowball43’s picture

Status: Active » Closed (fixed)

I've figured out the problem. Flash was calling the service at http://www.example.com/services/amfphp whereas I was at http://example.com/ when logging in via flash.