Display the verifier if OAuth 1.0a is being used in OOB mode
authorTom Hughes <tom@compton.nu>
Mon, 20 Sep 2010 20:44:54 +0000 (21:44 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 21 Sep 2010 15:20:30 +0000 (16:20 +0100)
app/controllers/oauth_controller.rb
app/views/oauth/authorize_success.html.erb

index 260f9ec..f70a644 100644 (file)
@@ -57,7 +57,7 @@ class OauthController < ApplicationController
           else
             redirect_url = @token.oob? ? @token.client_application.callback_url : @token.callback_url
           end
-          if redirect_url
+          if redirect_url and not redirect_url.empty?
             if @token.oauth10?
               redirect_to "#{redirect_url}?oauth_token=#{@token.token}"
             else
index effe24a..a25b98e 100644 (file)
@@ -1 +1,5 @@
-<h1>You have allowed this request</h1>
\ No newline at end of file
+<h1>You have allowed this request</h1>
+
+<% if @token.oob? %>
+<p>The verification code is <%= @token.verifier %></p>
+<% end %>