From: Tom Hughes Date: Mon, 20 Sep 2010 20:44:54 +0000 (+0100) Subject: Display the verifier if OAuth 1.0a is being used in OOB mode X-Git-Tag: live~6312^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/2150d1021e52e3441bad3bbd1a03ba68f89c7da6?ds=sidebyside Display the verifier if OAuth 1.0a is being used in OOB mode --- diff --git a/app/controllers/oauth_controller.rb b/app/controllers/oauth_controller.rb index 260f9ecfe..f70a644cd 100644 --- a/app/controllers/oauth_controller.rb +++ b/app/controllers/oauth_controller.rb @@ -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 diff --git a/app/views/oauth/authorize_success.html.erb b/app/views/oauth/authorize_success.html.erb index effe24a79..a25b98ec7 100644 --- a/app/views/oauth/authorize_success.html.erb +++ b/app/views/oauth/authorize_success.html.erb @@ -1 +1,5 @@ -

You have allowed this request

\ No newline at end of file +

You have allowed this request

+ +<% if @token.oob? %> +

The verification code is <%= @token.verifier %>

+<% end %>