# Lost User session when back from REST web service

**URL:** <https://www.ruby-forum.com/t/lost-user-session-when-back-from-rest-web-service/183322>\
**Category:** Rails\
**Created:** [February 11, 2010, 7:34pm UTC](https://www.ruby-forum.com/t/lost-user-session-when-back-from-rest-web-service/183322 "2010-02-11T19:34:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [February 11, 2010, 7:34pm UTC](https://www.ruby-forum.com/t/lost-user-session-when-back-from-rest-web-service/183322/1 "2010-02-11T19:34:20Z")

</div>

Once logged in and authenticated (using Authlogic), a user in my app  
can upload a media file into a Remote Media Server , using a form. In  
the form there is an url back upon success.

Fine, the file uploads correctly, the url\_back is used upon success  
and parameters are passed back (media\_id)  
but… the session is lost

so I wrote a before\_filter :  
before\_filter :require\_user, :except =\> [:success, :failed]

in this case I lost the current\_user… (not abig deal as the :id is  
passed back in the parameters

Is it normal to loose the session ? or did I miss anything prior  
calling the remote server ?

thanks for your info

Yves
