I have also encountered a situation with the keylock infinite loop, but in the end, I found that my problem was a version issue between the keylock service and the keyleak.js adapter, and I wanted to use it in an internal network environment, so HTTPS was also an issue. After downgrading both to version 21.1.5, it was resolved