What is the best way to extend restful_authentication/AuthLogic to support lazy logins by an anonymo

Posted by Kevin Elliott on Stack Overflow See other posts from Stack Overflow or by Kevin Elliott
Published on 2008-12-09T02:38:03Z Indexed on 2010/04/03 2:53 UTC
Read the original article Hit count: 346

I'm building an iPhone application that talks to a Ruby on Rails backend. The Ruby on Rails application will also service web users. The restful_authentication plugin is an excellent way to provide quick and customizable user authentication. However, I would like users of the iPhone application to have an account created automatically by the phone's unique identifier ([[UIDevice device] uniqueIdentifier]) stored in a new column. Later, when users are ready to create a username/password, the account will be updated to contain the username and password, leaving the iPhone unique identifier intact. Users should not be able to access the website until they've setup their username/password. They can however, use the iPhone application, since the application can authenticate itself using it's identifier.

What is the best way to modify restful_authentication to do this? Create a plugin? Or modify the generated code?

What about alternative frameworks, such as AuthLogic. What is the best way to allow iPhones to get a generated auth token locked to their UUID's, but then let the user create a username/password later?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails