Issuer mismatch : WSO2 IS and Spring Boot but same URI configured

Viewed 1325

I'm just reproducing the WSO2 IS official tutorial here : https://is.docs.wso2.com/en/5.11.0/develop/spring-boot/

There for in Spring, my OIDC configuration is simply :

provider:
  host: https://localhost:9443 #Change the host
  
spring:
   security:
     oauth2:
       client:
         registration:
           wso2:
             client-name : WSO2 Identity Server
             client-id: aXOWlNxT0aKIfKIeH82IfsmLjsYa #Change client-id
             client-secret: CVl_vmEYqRuZddBu3ZCYQQwGtYsa # Change client-secret
             authorization-grant-type: authorization_code
             scope: openid
         provider:
           wso2:
             issuer-uri: ${provider.host}/oauth2/oidcdiscovery
   thymeleaf:
     cache: false

Nonetheless, I still get this Error :

Caused by: java.lang.IllegalStateException: The Issuer "https://localhost:9443/oauth2/token" provided in the configuration metadata did not match the requested issuer "https://localhost:9443/oauth2/oidcdiscovery" at org.springframework.util.Assert.state(Assert.java:97) ~[spring-core-5.3.2.jar:5.3.2] at org.springframework.security.oauth2.client.registration.ClientRegistrations.withProviderConfiguration(ClientRegistrations.java:239) ~[spring-security-oauth2-client-5.4.2.jar:5.4.2] at org.springframework.security.oauth2.client.registration.ClientRegistrations.lambda$oidc$0(ClientRegistrations.java:158) ~[spring-security-oauth2-client-5.4.2.jar:5.4.2] at

Also, my WSO2 IS is properly configured. Only defaults. As shown in the screenshot below with Identity Provider configuration

enter image description here

What should I do ?

1 Answers

This issue has been already reported [1], and as the solution /token endpoint has been configured for the discovery request [2].

Related