Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replaces request.host with request.host_with_port

  • Loading branch information...
commit 3ecad38c7cfab727801ad6df15efec043d368fbf 1 parent 1ddd45b
Paul Hepworth authored
2  lib/generators/janrain/templates/controller.rb
View
@@ -3,7 +3,7 @@ def new
end
def create
- if @<%= singular_name %> = <%= class_name %>.authenticate(params[:code], host: request.host)
+ if @<%= singular_name %> = <%= class_name %>.authenticate(params[:code], host: request.host_with_port)
sign_in @<%= singular_name %>
flash[:notice] = 'You are now signed in'
else
8 lib/janrain/capture/url_helper.rb
View
@@ -8,21 +8,21 @@ module Janrain::Capture::UrlHelper
end
def janrain_signin_url(options={})
- "#{capture_config.domain}/oauth/signin?response_type=code&redirect_uri=#{janrain_redirect_url(options)}&client_id=#{capture_config.client_id}&xd_receiver=http%3A//#{request.host}/xdcomm.html"
+ "#{capture_config.domain}/oauth/signin?response_type=code&redirect_uri=#{janrain_redirect_url(options)}&client_id=#{capture_config.client_id}&xd_receiver=http%3A//#{request.host_with_port}/xdcomm.html"
end
def janrain_signup_url(options={})
- "#{capture_config.domain}/oauth/legacy_register?response_type=code&redirect_uri=#{janrain_redirect_url(options)}&client_id=#{capture_config.client_id}&xd_receiver=http%3A//#{request.host}/xdcomm.html"
+ "#{capture_config.domain}/oauth/legacy_register?response_type=code&redirect_uri=#{janrain_redirect_url(options)}&client_id=#{capture_config.client_id}&xd_receiver=http%3A//#{request.host_with_port}/xdcomm.html"
end
def janrain_edit_profile_url(user)
- "#{capture_config.domain}/oauth/profile?access_token=#{user.try(:access_token)}&callback=closeProfileEditor&xd_receiver=http%3A//#{request.host}/xdcomm.html"
+ "#{capture_config.domain}/oauth/profile?access_token=#{user.try(:access_token)}&callback=closeProfileEditor&xd_receiver=http%3A//#{request.host_with_port}/xdcomm.html"
end
private
def janrain_redirect_url(options={})
- CGI.escape(Janrain::Config.redirect_url({host:request.host}.merge(options)))
+ CGI.escape(Janrain::Config.redirect_url({host:request.host_with_port}.merge(options)))
end
def capture_config
2  lib/janrain/capture/user.rb
View
@@ -39,8 +39,6 @@ def to_capture(only_changes=false)
if capture_id.blank?
attrs.delete_if { |a,v| a == 'id' || a == 'capture_id' }
- else
- attrs.delete_if { |a,v| a == 'id' }
end
attrs
end
Please sign in to comment.
Something went wrong with that request. Please try again.