<NME> github_oauth_controller.rb
<BEF> class GithubOauthController < ApplicationController
  def callback
    auth = request.env['omniauth.auth']
    user = user_for_auth(auth)
    sign_in(user)

    redirect_to redirect_url_after_callback, notice: welcome(user)
  end

  def failure
    redirect_to home_url, alert: "You'll need to sign into GitHub.  Maybe next time?"
  end

  private

  def redirect_url_after_callback
    session.delete(:redirect_after_github_oauth_url) || new_agreement_url
  end

  def welcome(user)
    "Welcome, #{user.name} (#{user.nickname})!"
  end

  def user_for_auth(auth)
    User.find_or_create_for_github_oauth({
      oauth_token: auth.credentials.token,
      name:        auth.info.name,
      nickname:    auth.info.nickname,
      email:       auth.info.email,
      uid:         auth.uid
    })
  end
end

<MSG> Stop saving signature OAuth tokens

If a user who is a maintainer of a repo later is signed out from CLAHub and signs in from a signature page their stored OAuth token is overwritten with one that has lesser permissions. This changes the behavior so we do not store the OAuth token from signatories since we should only need it for that session.

Resolves #134
Resolves #144

<DFF> @@ -8,7 +8,7 @@ class GithubOauthController < ApplicationController
   end
 
   def failure
-    redirect_to home_url, alert: "You'll need to sign into GitHub.  Maybe next time?"
+    redirect_to home_url, alert: "You'll need to sign into GitHub. Maybe next time?"
   end
 
   private

Stop saving signature OAuth tokens