:) I checked that the first time, of course. I know I came off a lil
dim last time but come on :D

I dumped all the cookies and authentication data and all other private
data twice and restarted FF and checked again to make sure nothings
hanging around and then cleared it again and I tried logging in :).
IAT error. Any other possible causes?

I'll start googling. Thanks for your help Fred. really appreciate it.

On Apr 11, 4:31 pm, Frederick Cheung <frederick.che...@gmail.com>
wrote:
> On Apr 11, 12:25 pm, Ram <yourstruly.vi...@gmail.com> wrote:
>
> > :D <duh...>
>
> > ok i cleared the relevant cookies in Safari and its working now.
>
> > But Firefox is throwing me the InvalidAuthenticityToken error when i
> > try to login. any idea why?
>
> maybe it also had duff cookies? authenticity tokens are based on the
> session, so if the session is  messed up, so would they.
>
> Fred
>
>
>
> > On Apr 11, 4:09 pm, Frederick Cheung <frederick.che...@gmail.com>
> > wrote:
>
> > > On Apr 11, 12:01 pm, Ram <yourstruly.vi...@gmail.com> wrote:
>
> > > > I guessed I should be checking that but I really couldnt figure out
> > > > HOW to check them!
>
> > > Wasn't thinking of anything more sophisticated than checking in your
> > > browser's preferences.
>
> > > Fred
>
> > > > I use restful_authentication so where in the flow should i be raising
> > > > an exception and what should i be throwing up to debug?
> > > > Im actually pretty sure there're excess cookies hanging around.
> > > > Because when I go to domain.com/login, it takes me right in and gives
> > > > me a routing error cos of the subdomain absence. when i type in the
> > > > url domain.com/logout, it goes to the login page, fails
> > > > in :not_logged_in_required and takes me into the app again and throws
> > > > the same routing error. So there is definitely a session hanging
> > > > around. How do i clean that up?
>
> > > > On Apr 11, 3:49 pm, Frederick Cheung <frederick.che...@gmail.com>
> > > > wrote:
>
> > > > > On Apr 11, 11:43 am, Ram <yourstruly.vi...@gmail.com> wrote:
>
> > > > > > Im using Rails 2.1.0 so I understand the option is still
> > > > > > session_options[:session_domain] for me (as opposed to 
> > > > > > session_options
> > > > > > [:domain] for 2.2.0+)
>
> > > > > > By the way, ive tried setting ActionController::Base.session_options
> > > > > > [:session_domain] to both 'domain.com' and '.domain.com' but both 
> > > > > > give
> > > > > > me the problems.
>
> > > > > > Any idea what might be wrong?
>
> > > > > Have you checked that the cookie is getting stored with the
> > > > > appropriate domain  (and that you don't have excess session cookies
> > > > > left hanging around from your experimentations) ?
>
> > > > > Fred
>
> > > > > > On Apr 11, 8:37 am, Andrew Timberlake <and...@andrewtimberlake.com>
> > > > > > wrote:
>
> > > > > > > >> Hi all,
>
> > > > > > > >> Ive got a login form for users with the fields subdomain, 
> > > > > > > >> username and
> > > > > > > >> password. This is at the URLhttp://domain.com.
>
> > > > > > > >> When the user submits the form and login is successful, i need 
> > > > > > > >> the URL
> > > > > > > >> to change tohttp://subdomain.domain.com/whatever.
> > > > > > > >> How can I do this?
>
> > > > > > > > You need to set your session cookie to apply to the whole 
> > > > > > > > domain (so
> > > > > > > > that when it is set from the page at domain.com it is also sent 
> > > > > > > > when
> > > > > > > > the browser requests subdomain.domain.com. It's one of the 
> > > > > > > > session
> > > > > > > > options you can set in environment.rb
>
> > > > > > > > Fred
>
> > > > > > > >> My try was
>
> > > > > > > >> if no_subdomain?
> > > > > > > >>     redirect_to 
> > > > > > > >> "http://#{params[:subdomain]}.domain.com/whatever";
> > > > > > > >> else
> > > > > > > >>     redirect_to whatever_path
> > > > > > > >> end
>
> > > > > > > >> But I think the session data is lost when you redirect like 
> > > > > > > >> above. So
> > > > > > > >> it takes me back to the login form.
> > > > > > > >> Any ideas?
>
> > > > > > > Set the following in your config/environments/production.rb file:
> > > > > > > ActionController::Base.session_options[:session_domain] = 
> > > > > > > 'domain.com'
> > > > > > > This will store the session cookie on domain.com which will then 
> > > > > > > also
> > > > > > > be readable on subdomain.domain.com
>
> > > > > > > Andrew 
> > > > > > > Timberlakehttp://ramblingsonrails.comhttp://www.linkedin.com/in/andrewtimberlake
>
> > > > > > > "I have never let my schooling interfere with my education" - 
> > > > > > > Mark Twain
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to