mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Refactor rp_id and rp_name (#23339)
They're both constant per-instance values, there is no need to store them in the session. This also makes the code a bit more readable by moving the `session_challenge_key` method up to the `DiscourseWebauthn` module.
This commit is contained in:
@@ -120,7 +120,7 @@ RSpec.describe SessionController do
|
||||
expect(response_body_parsed["challenge"]).to eq(
|
||||
DiscourseWebauthn.challenge(user, secure_session),
|
||||
)
|
||||
expect(DiscourseWebauthn.rp_id(user, secure_session)).to eq(Discourse.current_hostname)
|
||||
expect(DiscourseWebauthn.rp_id).to eq(Discourse.current_hostname)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user