Hi, I want to authentication for sign in and sign out, i add gem file and create a user model using devise in rails3, i want to create a user for first sign in and sign out, how can i create, any suggestion. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1387c52c-3684-44f1-89b7-4cc93a2aadb5%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Create a new User object, then fill in the fields, and call save. -- Dheeraj Kumar On Monday 22 July 2013 at 5:19 PM, Tushar Patil wrote:> Hi, > I want to authentication for sign in and sign out, i add gem file and create a user model using devise in rails3, i want to create a user for first sign in and sign out, how can i create, any suggestion. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1387c52c-3684-44f1-89b7-4cc93a2aadb5%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/05B2251B87C649EAB0DE5C025F73EE8C%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
I use email for login , so I do this in the console/database seed file : User.create(email: ''test-J0of1frlU80@public.gmane.org'', password: ''password123'', password_confirmation: ''password123'') Then I log in with the "test-J0of1frlU80@public.gmane.org" and "password123" On 22 July 2013 17:21, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Create a new User object, then fill in the fields, and call save. > > -- > Dheeraj Kumar > > On Monday 22 July 2013 at 5:19 PM, Tushar Patil wrote: > > Hi, > I want to authentication for sign in and sign out, i add gem file and > create a user model using devise in rails3, i want to create a user for > first sign in and sign out, how can i create, any suggestion. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/1387c52c-3684-44f1-89b7-4cc93a2aadb5%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/05B2251B87C649EAB0DE5C025F73EE8C%40gmail.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJ%3Dox-ATBkyN%2BmENdH5mii9%2B%2BoFSnF0MXy9WN2ZBvZXGYgsn%3DQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Emil S. wrote in post #1116233:> I use email for login , so I do this in the console/database seed file : > User.create(email: ''test-J0of1frlU80@public.gmane.org'', password: ''password123'', > password_confirmation: ''password123'') > Then I log in with the "test-J0of1frlU80@public.gmane.org" and "password123"Personally speaking, I generally dislike the practice of using email addresses as usernames. Yes, it has a certain convenience. Convenience will always be in contention with security. There are a number of reasons for this: 1. If the site gets hacked there is no way to protect email addresses from exposure. If email addresses are kept separate from the user account information then it is at least possible to protect them from a hack against the user login info. 2. If a user changes their email address (or otherwise loses control of their email account) they have no way to verify themselves in case they need to reset their password. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/109f507533ae30c67151c56b115d7a16%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Dave Aronson
2013-Jul-22 16:42 UTC
Re: Re: How to create first user for sign in using devise
On Mon, Jul 22, 2013 at 11:39 AM, Robert Walker <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I generally dislike the practice of using email > addresses as usernames.Amen! In addition to the reasons you list, people often have multiple addresses at once -- I myself have several, not even including the hundreds of special-purpose ones I make up on the fly at my domains. Then, logging into a system you haven''t been on in years, do they really expect you to remember *which* address you used back then *for that site*? Meanwhile, I use the same username almost everywhere; just about the only exceptions are a few places where that''s too long, or it has to have both letters and digits. (Yes I mean the username, not the password!) -Dave -- Dave Aronson, the T. Rex of Codosaurus LLC, secret-cleared freelance software developer taking contracts in or near NoVa or remote. See information at http://www.Codosaur.us/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHxKQihbVvTT4%3Ds5JTH3jaokp4cSUV8rnnqk7k0MMHx2juWZwQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Norbert Melzer
2013-Jul-22 17:01 UTC
Re: How to create first user for sign in using devise
Devise has a wonderful kickstarter, just take a look into the readme and follow the steps. Am 22.07.2013 13:50 schrieb "Tushar Patil" <tushar01patil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> Hi, > I want to authentication for sign in and sign out, i add gem file and > create a user model using devise in rails3, i want to create a user for > first sign in and sign out, how can i create, any suggestion. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/1387c52c-3684-44f1-89b7-4cc93a2aadb5%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BbCVsvy%2BZRhBBrQRK5nvm%3DUE8gcfg6NmgHWCw%2BhF1LCKxzECg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
The user actually "uses" the email ID and can remember it . I can never remember my "usernames" , usually. Also "forgot password" becomes easy with email ID''s . But then again, to each, his own. On 22 July 2013 21:09, Robert Walker <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Emil S. wrote in post #1116233: > > I use email for login , so I do this in the console/database seed file : > > User.create(email: ''test-J0of1frlU80@public.gmane.org'', password: ''password123'', > > password_confirmation: ''password123'') > > Then I log in with the "test-J0of1frlU80@public.gmane.org" and "password123" > > Personally speaking, I generally dislike the practice of using email > addresses as usernames. Yes, it has a certain convenience. Convenience > will always be in contention with security. > > There are a number of reasons for this: > > 1. If the site gets hacked there is no way to protect email addresses > from exposure. If email addresses are kept separate from the user > account information then it is at least possible to protect them from a > hack against the user login info. > > 2. If a user changes their email address (or otherwise loses control of > their email account) they have no way to verify themselves in case they > need to reset their password. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/109f507533ae30c67151c56b115d7a16%40ruby-forum.com > . > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJ%3Dox-BG%2BkuJzRMBa0uey%3Db-UKjOidtDkc3kq-48UWgutGZ_2g%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Robert Walker
2013-Jul-23 12:55 UTC
Re: Re: How to create first user for sign in using devise
Emil S. wrote in post #1116325:> The user actually "uses" the email ID and can remember it . I can never > remember my "usernames" , usually. Also "forgot password" becomes easy > with > email ID''s . But then again, to each, his own.Yes "forgot password" is easy that way. It''s also easy for the hacker who hijacks the email account used to sign into the site. Not only does the owner of the email account lose access to their email itself, but to any web site that user accesses using their email address as their login. Worse yet, it''s highly likely there''s information available in their email that gives the hacker good clues as to what online services they actually use. Convenience is the enemy of security. The trick is to understand the risks in order to find the right balance. Ideally multi-factor authentication should be used for any sensitive online service, which is certainly not convenient, but is vital to protecting online identity. As for remembering login information, that''s what password managers are for. I myself have well over 100 logins stored in my password manager each one with unique auto-generated passwords. With such a tool I only have to remember (and protect) a single password. Any conveniences employed by online services do nothing for me besides reduce the level of security of that given service. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/86ccfaf942fdc8d0a5fdd8fedb188cef%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jul-23 13:20 UTC
Re: Re: How to create first user for sign in using devise
On Jul 23, 2013, at 3:39 AM, Emil S <emil.soman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The user actually "uses" the email ID and can remember it . I can never remember my "usernames" , usually. Also "forgot password" becomes easy with email ID''s . But then again, to each, his own. >What happens when the user wants to change their email address? I''ve encountered sites where I haven''t been able to do this as it is the key thing associated with the account on that site. I''ve lost accounts because of this, and they weren''t just minor things. One was Amazon, although it was a long time ago now. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/B6DD1C8A-26FB-47F4-9A5E-5A66267B8F2E%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.