views:

14

answers:

2

I have an action named 'login' that shows the login form.

The form posts to the 'signin' action.

I haven't implemented the authentication logic yet, so I tried this:

def signin

    redirect_to login
  end

So when the login form posts, it just redirects back to the login page again.

Cannot redirect to nil!

but its not working, why?

A: 

why build the auth from scratch when the have openid and basic auth plugins already built? that's just where i go with it...

aking1012
+2  A: 

You almost had it

redirect_to login_url

Good for you for trying to build your own authentication system. But if you do eventually plan on going to production, please consider using an established authentication system (such as Devise) unless you REALLY know what you're doing, and know all the security issues like the back of your hand. Get started here http://guides.rubyonrails.org/security.html

monocle
hmm...what is so special about an authentication system? I'm using a salt for each user password that's incrypted, what else?
Blankman