<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Authentication with Devise and Warden, part 1: Up and Running</title>
	<atom:link href="http://blog.mealstrom.com/2009/12/authentication-with-devise-and-warden-part-1-up-and-running/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mealstrom.com/2009/12/authentication-with-devise-and-warden-part-1-up-and-running/</link>
	<description>The Mealstrom blog</description>
	<lastBuildDate>Sun, 04 Apr 2010 01:18:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Michael</title>
		<link>http://blog.mealstrom.com/2009/12/authentication-with-devise-and-warden-part-1-up-and-running/comment-page-1/#comment-170</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 04 Apr 2010 01:18:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mealstrom.com/?p=240#comment-170</guid>
		<description>Hi Alex,

Thanks for the great post! It was really helpful when first trying to install Devise. Any chance of you doing a post on how to add a new strategy for logging in using a username or email? 

So far, all I&#039;ve found is that the strategy should be added to Warden (I thought it was supposed to be added to Devise), but I don&#039;t know where/how to add and setup the code. (I&#039;m still quite new to Rails.)

Anyway, it would be great if you could do a follow-up post on that, but I&#039;m not sure how busy you are or what else you&#039;ve got planned.

Either way, thanks again for the helpful post!</description>
		<content:encoded><![CDATA[<p>Hi Alex,</p>
<p>Thanks for the great post! It was really helpful when first trying to install Devise. Any chance of you doing a post on how to add a new strategy for logging in using a username or email? </p>
<p>So far, all I&#8217;ve found is that the strategy should be added to Warden (I thought it was supposed to be added to Devise), but I don&#8217;t know where/how to add and setup the code. (I&#8217;m still quite new to Rails.)</p>
<p>Anyway, it would be great if you could do a follow-up post on that, but I&#8217;m not sure how busy you are or what else you&#8217;ve got planned.</p>
<p>Either way, thanks again for the helpful post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://blog.mealstrom.com/2009/12/authentication-with-devise-and-warden-part-1-up-and-running/comment-page-1/#comment-93</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sun, 14 Feb 2010 02:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mealstrom.com/?p=240#comment-93</guid>
		<description>Thanks!  This is very helpful.  I&#039;ve decided to try working with Devise and this gave me some good background to get up and running. I would love to see a similar post about integrating Devise with Facebook Connect which will be my next step....</description>
		<content:encoded><![CDATA[<p>Thanks!  This is very helpful.  I&#8217;ve decided to try working with Devise and this gave me some good background to get up and running. I would love to see a similar post about integrating Devise with Facebook Connect which will be my next step&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://blog.mealstrom.com/2009/12/authentication-with-devise-and-warden-part-1-up-and-running/comment-page-1/#comment-73</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Thu, 17 Dec 2009 14:14:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mealstrom.com/?p=240#comment-73</guid>
		<description>Hey Carlos,

Thanks!  I&#039;ve really enjoyed working with Devise -- thank you for the great gem.  I&#039;m glad to be able to contribute something useful back to the community.

You make two very good points.  I&#039;ve updated the post to include your note about authenticate! v. authenticate_*! -- while I&#039;m using only one resource, I want to cover as full a range of features with my blog posts (and multiple resources is a very cool feature).

As far as authentication_keys go, I saw that options when I set up Devise, but that feature didn&#039;t seem to allow exactly what I wanted to do.  If I read the code right, all the keys you specify are required to log in, so if you added username to email and password it would require all three.  

Since each user on our sites will have a username, I want to offer the ability to log in using either a username or an email (entered interchangeably into the same field) along with the appropriate password.  Since it&#039;s probably an infrequent need, I wouldn&#039;t expect that behavior to be supported out of the box; it seems like a great case for a custom strategy.  (That&#039;s actually the example I&#039;m planning to use in the next entry to describe how to create your own strategies.  Vacation allowing, I&#039;m hoping to get the next entry out before the new year.)

Thanks again for your feedback!  

Alex</description>
		<content:encoded><![CDATA[<p>Hey Carlos,</p>
<p>Thanks!  I&#8217;ve really enjoyed working with Devise &#8212; thank you for the great gem.  I&#8217;m glad to be able to contribute something useful back to the community.</p>
<p>You make two very good points.  I&#8217;ve updated the post to include your note about authenticate! v. authenticate_*! &#8212; while I&#8217;m using only one resource, I want to cover as full a range of features with my blog posts (and multiple resources is a very cool feature).</p>
<p>As far as authentication_keys go, I saw that options when I set up Devise, but that feature didn&#8217;t seem to allow exactly what I wanted to do.  If I read the code right, all the keys you specify are required to log in, so if you added username to email and password it would require all three.  </p>
<p>Since each user on our sites will have a username, I want to offer the ability to log in using either a username or an email (entered interchangeably into the same field) along with the appropriate password.  Since it&#8217;s probably an infrequent need, I wouldn&#8217;t expect that behavior to be supported out of the box; it seems like a great case for a custom strategy.  (That&#8217;s actually the example I&#8217;m planning to use in the next entry to describe how to create your own strategies.  Vacation allowing, I&#8217;m hoping to get the next entry out before the new year.)</p>
<p>Thanks again for your feedback!  </p>
<p>Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos A. da Silva</title>
		<link>http://blog.mealstrom.com/2009/12/authentication-with-devise-and-warden-part-1-up-and-running/comment-page-1/#comment-71</link>
		<dc:creator>Carlos A. da Silva</dc:creator>
		<pubDate>Sun, 13 Dec 2009 00:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mealstrom.com/?p=240#comment-71</guid>
		<description>Hello, pretty nice post about Devise. It&#039;s a great explanation, I especially liked the &quot;Bumps in the Road&quot; part. I&#039;d like to help with two simple tips:

* The :authenticate! filter is gonna work only when you have just one resource to authenticate. Whenever you&#039;re dealing with many resources, you need to use the specific authenticate_*! methods:

  before_filter :authenticate_user!

* In the last versions of Devise (not sure which version it was added) you have some options that let you use different keys to authenticate the user, not just the :email. The first is the :authentication_keys configuration, that is actually the params coming from the form that will be used for authentication. And its complement is the find_for_authentication class method you can override to find the user based on these conditions:

  def self.find_for_authentication(conditions)
    find(:first, :conditions =&gt; conditions)
  end

Hope that might be useful =)
And thanks again for the great post. I Look forward to see the second part.
Carlos</description>
		<content:encoded><![CDATA[<p>Hello, pretty nice post about Devise. It&#8217;s a great explanation, I especially liked the &#8220;Bumps in the Road&#8221; part. I&#8217;d like to help with two simple tips:</p>
<p>* The :authenticate! filter is gonna work only when you have just one resource to authenticate. Whenever you&#8217;re dealing with many resources, you need to use the specific authenticate_*! methods:</p>
<p>  before_filter :authenticate_user!</p>
<p>* In the last versions of Devise (not sure which version it was added) you have some options that let you use different keys to authenticate the user, not just the :email. The first is the :authentication_keys configuration, that is actually the params coming from the form that will be used for authentication. And its complement is the find_for_authentication class method you can override to find the user based on these conditions:</p>
<p>  def self.find_for_authentication(conditions)<br />
    find(:first, :conditions =&gt; conditions)<br />
  end</p>
<p>Hope that might be useful =)<br />
And thanks again for the great post. I Look forward to see the second part.<br />
Carlos</p>
]]></content:encoded>
	</item>
</channel>
</rss>

