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

Login success but redirect again. #188

Open
joveth1 opened this issue Apr 10, 2024 · 3 comments
Open

Login success but redirect again. #188

joveth1 opened this issue Apr 10, 2024 · 3 comments

Comments

@joveth1
Copy link

joveth1 commented Apr 10, 2024

I'm use vue2 , the config like this.

Vue.use(keycloak, {
  init: {
    checkLoginIframe: false,
    onLoad: 'login-required'
  },
  config: {
    url: process.env.VUE_APP_SUP_KEYCLOAK_URL,
    realm: process.env.VUE_APP_SUP_KEYCLOAK_REALM,
    clientId: process.env.VUE_APP_SUP_KEYCLOAK_CLIENTID
  },
  onReady: (keycloak) => {
    console.log(keycloak)
    setToken(KEYCLOAK + keycloak.token, true)
    new Vue({
      el: '#app',
      router,
      store,
      render: h => h(App)
    })
  }
})

When login success and redirect to the dashboard, It's will redirect to the keycloak page again with error :Invalid parameter: redirect_uri

The browser url like this: http://172.1.101.10:8780/realms/sup/protocol/openid-connect/auth?client_id=one-ui&redirect_uri=http%3A%2F%2Flocalhost%3A8011%2Fone%2Fdashboard%23iss%3Dhttp%253A%252F%252F172.1.101.10%253A8780%252Frealms%252Fsup%23reloaded&state=7687d636-a26f-4c23-8ed7-1d8a506ca399&response_mode=fragment&response_type=code&scope=openid&nonce=3d318315-ad02-4ea7-8a9c-ed208a8d1c3b

In my keycloak project ,I have set Valid redirect URIs to *

image

Need Help!

Thanks!

@joveth1
Copy link
Author

joveth1 commented Apr 10, 2024

@Wilsonoonn
Copy link

redirect URL 是你要跳转的项目地址,不能是*

@akozlov99
Copy link

try to add useNonce: false in init section

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

No branches or pull requests

3 participants