mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Refactor webauthn to support passkeys (1/3) (#23586)
This is part 1 of 3, split up of PR #23529. This PR refactors the webauthn code to support passkey authentication/registration. Passkeys aren't used yet, that is coming in PRs 2 and 3. Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
This commit is contained in:
@@ -14,6 +14,9 @@ describe "User preferences for Security", type: :system do
|
||||
|
||||
describe "Security keys" do
|
||||
it "adds a 2F security key and logs in with it" do
|
||||
# system specs run on their own host + port
|
||||
DiscourseWebauthn.stubs(:origin).returns(current_host + ":" + Capybara.server_port.to_s)
|
||||
|
||||
# simulate browser credential authorization
|
||||
options = ::Selenium::WebDriver::VirtualAuthenticatorOptions.new
|
||||
page.driver.browser.add_virtual_authenticator(options)
|
||||
|
||||
Reference in New Issue
Block a user