diff --git a/app.json b/app.json index 35c2c33c..c7474659 100644 --- a/app.json +++ b/app.json @@ -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"], diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 408e5a48..49c96c60 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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