auth-module icon indicating copy to clipboard operation
auth-module copied to clipboard

fix: overwrite array instead of merge

Open mitto98 opened this issue 3 years ago • 2 comments

The openIDConnect scheme by default has 3 scopes and, since defu by default merge arrays, you can't overwrite by defining scope inside the strategy definition.

mitto98 avatar Jan 19 '22 09:01 mitto98

This is a non-trivial algorithm, so refactoring it in future is likely to cause behaviour differences. And those behaviour differences will change the effective config of implementations of this module, potentially subtly breaking working auth setups. Only way to ensure that doesn't happen is with tests, which means merging (and thus committing to maintain this code) will require unit tests for this code. Let me know if you need help in making that happen.

bmulholland avatar Jan 19 '22 09:01 bmulholland

Hi, sorry for taking so long, just had two busy weeks. I added a basic test just to check if the problem I encountered does not recur. Is that enough? Do you have any idea on other tests I might add?

mitto98 avatar Feb 04 '22 08:02 mitto98