Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access to pages of sample app after login in WSO2 #5

Open
SMakhrov opened this issue Dec 5, 2020 · 2 comments
Open

Can't access to pages of sample app after login in WSO2 #5

SMakhrov opened this issue Dec 5, 2020 · 2 comments

Comments

@SMakhrov
Copy link

SMakhrov commented Dec 5, 2020

Hi!

I have tried this sample app, but after login in WSO2 it returning me to this page: http://localhost/login?error
What is wrong? Please help.
my application.yaml:

server:
  port: 80

logging:
  level:
    root: INFO
    org.springframework.web: TRACE
    org.springframework.security: TRACE
    org.springframework.security.oauth2: TRACE

provider:
  host: https://localhost:9443 #Change the host

client:
  client-id: C9szMcMGvX8HO9l7yFDnf70bv08a
  client-secret: TiVLEvQzSNfHoezGQp5DIzWOnHIa
  post-logout-uri: http://localhost/login
  scope: openid
  authorization-grant-type: authorization_code


#No need to change the following configurations
spring:
  security:
    oauth2:
      client:
        registration:
          wso2:
            client-name : WSO2 Identity Server
            client-id: ${client.client-id} #Change client-id
            client-secret: ${client.client-secret} # Change client-secret
            authorization-grant-type: ${client.authorization-grant-type}
            redirect-uri: "{baseUrl}/login/oauth2/code/wso2"
            scope: ${client.scope}
        provider:
          wso2:
            authorization-uri: ${provider.host}/oauth2/authorize
            token-uri: ${provider.host}/oauth2/token
            user-info-uri: ${provider.host}/oauth2/userinfo
            jwk-set-uri: ${provider.host}/oauth2/jwks
  thymeleaf:
    cache: false

I have installed locally WSO2. It's available at https://localhost:9443

@devrimbaris
Copy link

I too have a similar problem, after I press log in it says
"Registered callback does not match with the provided url."

any clues?

@bilalFedai
Copy link

Hi Devrim,

I also faced the same issue by following the documentation. I was able to overcome the problem by deleting the spring context path from the callback url.

Capture

Capture2

https://is.docs.wso2.com/en/5.11.0/develop/spring-boot/
https://github.com/wso2-extensions/identity-samples-spring-boot/blob/master/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants