# Session problem \[restful authentication\]

**URL:** <https://www.ruby-forum.com/t/session-problem-restful-authentication/143433>\
**Category:** Rails\
**Created:** [July 18, 2008, 2:32pm UTC](https://www.ruby-forum.com/t/session-problem-restful-authentication/143433 "2008-07-18T14:32:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [July 18, 2008, 2:32pm UTC](https://www.ruby-forum.com/t/session-problem-restful-authentication/143433/1 "2008-07-18T14:32:45Z")

</div>

Hi,

I just installed “restful\_auhtentication” to my application. The  
installation iteself went just fine but when i try to access sites that  
need authentication I get a strange error message from Firefox (German  
so I dont know the original message from Firefox):  
Redirecting loop: The website being called is redirecting a request  
which cannot be terminated.

When I try to add a new post for example I get redirected to  
/session/new and thats where I get that error. Does anybody has a clue  
what’s wrong here?!

Thanks a bunch,  
Cojones

---

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [July 18, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/session-problem-restful-authentication/143433/2 "2008-07-18T16:54:15Z")

</div>

Heinz S. wrote:

> Hi,
> 
> I just installed “restful\_auhtentication” to my application. The  
> installation iteself went just fine but when i try to access sites that  
> need authentication I get a strange error message from Firefox (German  
> so I dont know the original message from Firefox):  
> Redirecting loop: The website being called is redirecting a request  
> which cannot be terminated.
> 
> When I try to add a new post for example I get redirected to  
> /session/new and thats where I get that error. Does anybody has a clue  
> what’s wrong here?!
> 
> Thanks a bunch,  
> Cojones

Is ‘new’ the name of the method name and not the name of the page? It  
sounds like maybe you aren’t redirecting correctly?

---

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [July 18, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/session-problem-restful-authentication/143433/3 "2008-07-18T17:46:04Z")

</div>

Shandy N. wrote:

> Is ‘new’ the name of the method name and not the name of the page? It  
> sounds like maybe you aren’t redirecting correctly?

Well, I did it like always, SessionController:

# render new.rhtml

def new  
end

new.rhtml.erb is located in Views\sessions and routes does have  
following entry:  
map.resource :session

Quite normal I guess?

---

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [July 19, 2008, 4:06pm UTC](https://www.ruby-forum.com/t/session-problem-restful-authentication/143433/4 "2008-07-19T16:06:14Z")

</div>

Added skip\_before\_filter :login\_required to the SessionsController,  
problem solved.

---

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [July 19, 2008, 12:02pm UTC](https://www.ruby-forum.com/t/session-problem-restful-authentication/143433/5 "2008-07-19T12:02:45Z")

</div>

I’m desperate… any ideas?!

---

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [July 24, 2009, 10:24am UTC](https://www.ruby-forum.com/t/session-problem-restful-authentication/143433/6 "2009-07-24T10:24:14Z")

</div>

thanks man, this info helped me
