Skip to content

Commit

Permalink
Remove the WEBAUTHN_ORIGIN env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
isc committed Oct 18, 2023
1 parent 759f7d1 commit c95acd8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
6 changes: 0 additions & 6 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
"scripts": {
"postdeploy": "bundle exec rake db:schema:load"
},
"env": {
"WEBAUTHN_ORIGIN":{
"description": "This value needs to match `window.location.origin` evaluated by the User Agent during WebAuthn registration and authentication ceremonies.",
"value": ""
}
},
"environments": {
"test": {
"addons": ["heroku-redis:in-dyno", "heroku-postgresql:in-dyno"],
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,7 @@ def table_configuration_for table
end

def relying_party
@relying_party ||= WebAuthn::RelyingParty.new(origin: relying_party_origin, name: 'Adminium')
end

def relying_party_origin
Rails.env.test? ? Capybara.current_session.server.base_url : (ENV['WEBAUTHN_ORIGIN'] || 'http://localhost:3000')
@relying_party ||= WebAuthn::RelyingParty.new(origin: request.base_url, name: 'Adminium')
end

def handle_collaborator_token
Expand Down

0 comments on commit c95acd8

Please sign in to comment.