Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Newbie Question, Re: signup confirmation

signup confirmation rails

  • Please log in to reply
4 replies to this topic

#1 jim_2002

jim_2002

    Signalman

  • Members
  • 13 posts

Posted 28 December 2013 - 12:20 AM

Hi everyone

I'm trying to build email signup confirmation so when people sign up, a random url is send to their email for confirmation.

I don't know where to start, does it have something to do with state machines?  Are you able to point me to the right direction? 

Thanks in advance.



#2 Ohm

Ohm

    Guard

  • Members
  • 179 posts
  • LocationCopenhagen

Posted 28 December 2013 - 01:14 PM

If it's for a larger project, you really should use gems like devise or authlogic to handle signup and sign in.

 

If I had to do it myself, I'd add an active flag on the user and then in the controller check that the random part of the URL (the hash) matches some hash of the users attributes together with a salt.


Blog: http://ohm.sh | Twitter: madsohm


#3 jim_2002

jim_2002

    Signalman

  • Members
  • 13 posts

Posted 02 January 2014 - 04:47 AM

Thanks for the reply.

Does devise support rails 4 ?

Isn't it better to build authentication yourself?



#4 Ohm

Ohm

    Guard

  • Members
  • 179 posts
  • LocationCopenhagen

Posted 02 January 2014 - 06:33 AM

Yes I believe it will work in Rails 4 as well: https://github.com/p...formatec/devise.

 

No, you shouldn't build authentication yourself. Better to use an open source gem, where a lot of people can contribute to closing security holes, then you yourself having to close them in your own implementation.


Blog: http://ohm.sh | Twitter: madsohm


#5 jim_2002

jim_2002

    Signalman

  • Members
  • 13 posts

Posted 03 January 2014 - 12:58 AM

ok thanks very much.







Also tagged with one or more of these keywords: signup confirmation, rails

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users