File tree 2 files changed +21
-7
lines changed
2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 1
1
=== master
2
2
3
+ * Use allowed_origins instead of origin argument to WebAuthn::RelyingParty.new to avoid deprecation warning in webauthn 3.4.0+ (jeremyevans)
4
+
3
5
* Change JSON.fast_generate to JSON.generate in jwt feature to avoid deprecation warning in recent json versions (jeremyevans)
4
6
5
7
* Avoid exceeding 4K cookie size limit by setting an upper limit on path size when using login_return_to_requested_location? (jeremyevans)
Original file line number Diff line number Diff line change @@ -410,13 +410,25 @@ def possible_authentication_methods
410
410
private
411
411
412
412
if WebAuthn ::VERSION >= '3'
413
- def webauthn_relying_party
414
- # No need to memoize, only called once per request
415
- WebAuthn ::RelyingParty . new (
416
- origin : webauthn_origin ,
417
- id : webauthn_rp_id ,
418
- name : webauthn_rp_name ,
419
- )
413
+ if WebAuthn ::RelyingParty . instance_method ( :initialize ) . parameters . include? ( [ :key , :allowed_origins ] )
414
+ def webauthn_relying_party
415
+ # No need to memoize, only called once per request
416
+ WebAuthn ::RelyingParty . new (
417
+ allowed_origins : [ webauthn_origin ] ,
418
+ id : webauthn_rp_id ,
419
+ name : webauthn_rp_name ,
420
+ )
421
+ end
422
+ # :nocov:
423
+ else
424
+ def webauthn_relying_party
425
+ WebAuthn ::RelyingParty . new (
426
+ origin : webauthn_origin ,
427
+ id : webauthn_rp_id ,
428
+ name : webauthn_rp_name ,
429
+ )
430
+ end
431
+ # :nocov:
420
432
end
421
433
422
434
def webauthn_create_relying_party_opts
You can’t perform that action at this time.
0 commit comments