# Single Sign on

**URL:** <https://www.ruby-forum.com/t/single-sign-on/120622>\
**Category:** Ruby\
**Created:** [November 19, 2007, 9:30am UTC](https://www.ruby-forum.com/t/single-sign-on/120622 "2007-11-19T09:30:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 19, 2007, 9:30am UTC](https://www.ruby-forum.com/t/single-sign-on/120622/1 "2007-11-19T09:30:49Z")

</div>

Hello,

I have been trying to have a single sign on for my rails application.  
I somehow fail to understand how to access that particular user object  
from within the login method from the account controller.

I tried: User.find\_by\_login(@params[:user\_login]) in which user\_login  
is the name of the text field in the login.rhtml, but I cant access  
the user object.

My plan is to access the user oject, check his role and then  
accordingly route him to the right page.

Is there an alternate way to achieve this?

Thank you!
