title: Should I use resource routing even for non-CRUD routes (Rails)?
body: <p>Is it considered best practice to use <a href="https://guides.rubyonrails.org/routing.html#resource-routing-the-rails-default" rel="nofollow noreferrer">resourceful routes</a> in Rails whenever possible, even if the CRUD verbs don't really match the actions being performed (details follow)?</p>
  
  <p>In my Rails app, I'm implementing an OAuth login system using <a href="https://github.com/Sorcery/sorcery" rel="nofollow noreferrer"><code>sorcery</code></a>'s <code>external</code> module. I closely followed their official <a href="https://github.com/NoamB/sorcery/wiki/External" rel="nofollow noreferrer">tutorial</a>, which defines the routes for the OAuth methods like this.</p>
  
  <pre class="lang-rb prettyprint-override"><code># config/routes.rb
  post "oauth/callback" =&gt; "oauths#callback"
  get "oauth/callback" =&gt; "oauths#callback" # for use with Github, Facebook
  get "oauth/:provider" =&gt; "oauths#oauth", :as =&gt; :auth_at_provider
  </code></pre>
  
  <p>Basically, <code>auth_at_provider</code> is called when the user clicks the "Login via [Provider Name]" button, and the <code>callback</code> is called once they log in via the external provider.</p>
  
  <p>I left the routes as-is, but a teammate reviewing it suggested we use resource routing, like this for example:</p>
  
  <pre class="lang-rb prettyprint-override"><code>resources :oauth only: [:index, :create, :show]
  </code></pre>
  
  <p>I guess this is technically possible, but for me the singular routes defined in the tutorial are much more intuitive and self-explanatory. So my questions are:</p>
  
  <ul>
  <li>Is it considered better (or common) to use resourceful routes even in cases like this? or</li>
  <li>Are resourceful routes just a shorthand for cookie-cutter routes, and should only be used for straightforward controllers?</li>
  </ul>