Ok, I just ran into this myself.
It seems the reference implementation uses a feature that works on 2.7+ which is instantiating an object with an empty hash reference.
args = {}
class A; end
A.new(**args) #=> works only if ruby >= 2.7
Even in ruby >= 2.7 the reference code (lib/single_sign_on.rb) will raise an error if you were to pass a hash in when calling #parse because on lib/single_sign_on.rb:65 it calls sso = new(**init_kwargs) and #initialize(secure_session:) is defined in app/models/discourse_single_sign_on.rb:28 even though DiscourseSingleSignOn inherits from SingleSignOn
That wouldn’t help people using that code and either use ruby < 2.7 in their project or pass some kwargs.
So yes, at the very minimum I think SingleSignOn should implement def initialize(**kwargs);end