From 2150d1021e52e3441bad3bbd1a03ba68f89c7da6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 20 Sep 2010 21:44:54 +0100 Subject: [PATCH] Display the verifier if OAuth 1.0a is being used in OOB mode --- app/controllers/oauth_controller.rb | 2 +- app/views/oauth/authorize_success.html.erb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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 %> -- 2.39.5