Fix Keybase verification using wrong domain for remote accounts (#10547)
This commit is contained in:
parent
793b0513eb
commit
a9f130b8d8
6 changed files with 23 additions and 18 deletions
|
@ -3,10 +3,11 @@
|
|||
class ProofProvider::Keybase::Badge
|
||||
include RoutingHelper
|
||||
|
||||
def initialize(local_username, provider_username, token)
|
||||
def initialize(local_username, provider_username, token, domain)
|
||||
@local_username = local_username
|
||||
@provider_username = provider_username
|
||||
@token = token
|
||||
@domain = domain
|
||||
end
|
||||
|
||||
def proof_url
|
||||
|
@ -18,7 +19,7 @@ class ProofProvider::Keybase::Badge
|
|||
end
|
||||
|
||||
def icon_url
|
||||
"#{ProofProvider::Keybase::BASE_URL}/#{@provider_username}/proof_badge/#{@token}?username=#{@local_username}&domain=#{domain}"
|
||||
"#{ProofProvider::Keybase::BASE_URL}/#{@provider_username}/proof_badge/#{@token}?username=#{@local_username}&domain=#{@domain}"
|
||||
end
|
||||
|
||||
def avatar_url
|
||||
|
@ -41,8 +42,4 @@ class ProofProvider::Keybase::Badge
|
|||
def default_avatar_url
|
||||
asset_pack_path('media/images/proof_providers/keybase.png')
|
||||
end
|
||||
|
||||
def domain
|
||||
Rails.configuration.x.local_domain
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue