TLDR;
spring security couldn't find the jwkUri. Adding the line below fixed the issue.
.jwkSetUri(realmUrl + "/certs")
Ok so after adding the DEBUG option for spring security, which I completely forgot existed. I didn't get much wiser. There were no errors or anything of value shown in the DEBUG logs.
When I went digging some more in the docs I found the 'failureHandler'
.failureHandler((request, response, exception) -> {
exception.printStackTrace();
response.sendRedirect("/login?error=" + URLEncoder.encode(exception.getMessage(), StandardCharsets.UTF_8));
})
This showed that it couldn't find the jwk uri. After adding this line:
.jwkSetUri(realmUrl + "/certs")
to my clientRegistrationRepository, everything worked.
Thanks for the push in the right direction Toerktumlare