Questions tagged [keycloak-js]

25 questions
1
vote
0 answers

Can a JavaScript webapp support multiple versions of Keycloak servers at the same time?

We have an Angular web application which is using KeyCloak and is shipped to multiple customers. Some of them are using Keycloak version 19, others are Keycloak version 21. We are using Keycloak Adapter and it is tied to specific keycloak version…
ForestG
  • 17,538
  • 14
  • 52
  • 86
1
vote
0 answers

Why i get 'TypeError: error is undefined'?

I try to integrate Keycloak to my Angular application, so I did a simple application with 2 components. My package.json : { "name": "keycloak-integration", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build":…
1
vote
1 answer

Angular SSR (Universal) Website not working with keycloak-js adapter and keycloak-angular plugin

I am strugling to translate my website to Angular SSR for better SEO ranking. I manage to handle window, document, localStorgae calls in website. But when I check whole site with Keycloak integration it fails due to window issue again. I follow this…
1
vote
1 answer

Keycloak: OAUTH2, SSO and two different access tokens for two different rest-api backends with different JWT claims requirements

My JS React SPA web application (which is running in the browser) needs to securely access two different rest-api backends which are written in two different programming languages, deployed to two different physical servers and which parse/interpret…
1
vote
1 answer

ReactJS Keycloak PKCE sending code_verifier with token post request after authentication

I am trying to implement PKCE flow with keycloak and reactJS. I am generating code_challange and code verifier in my react client application. I have adapter configuration as follows : { "realm": "demo", "auth-server-url":…
1
vote
3 answers

Keycloak Invalid Redirect Uri, Page not found error

I am trying to integrating keycloak with angular but I am facing issue invalid_redirect_uri/Page_not_found error. Spent hours on googling but failed.
0
votes
0 answers

Issue with Keycloak redirection after incorrect configuration in Angular 13.3.2

I'm facing an issue integrating my Angular application (version 13.3.2) with Keycloak, using the packages "keycloak-angular": "10.0.2" and "keycloak-js": "9.0.3". When the configuration is correct (valid URL, realm, and clientId), the redirection…
SparrowVic
  • 274
  • 1
  • 7
0
votes
0 answers

Keycloak - Extend refresh_token expire time after requesting a new access token

I'm trying to extend the expiration time of refresh tokens, after using one. Let's imagine that my current access_token has expired. In order to have a new access_token, I make a request using my refresh token,…
Bishop19
  • 37
  • 9
0
votes
1 answer

How to get locale from keycloak with keycloak-js

Problem: There is no information in the keycloak documentation how to get locale information (which language was selected in the locale selector in the keycloak login page) in your app, after successfully logging in. There is one place in the docs…
Adi Dasler
  • 319
  • 4
  • 10
0
votes
0 answers

Authenticating users in React Expo Typescript with keycloak (22.0.1) - using keycloak-js and react-keycloak/web

I have authenticated users in a react expo typescript application with keycloak version 22.0.1, but whenever I run the app with "npx expo start --web", I am getting the following errors although the user is getting authenticated: WARNING in…
Galilo Galilo
  • 519
  • 5
  • 22
0
votes
0 answers

Keycloak auth request returning 401 error even after successful login and redirect - React JS

After log in with credentials and being redirected back to my website, keycloak request returns 401. Note! Im running keycloak locally using docker container This is my code for handling auth within react-js: ` const [isLogin, setLogin] =…
0
votes
1 answer

KeyCloak-js and vue3 - Need some pages to be public

I'm using keycloak-js adapter with a Vue 3 Application. This system has some public pages, so I can't call keycloak right away. I already setup a button to call the login page, but the token is not being setup in the localStorage. Basically my user…
0
votes
0 answers

Keycloak on Android app built with Capacitor: keycloak.init() Promise is not resolved

I am using keycloak v 21.0.1 with keycloak-js. I have the following code for keycloak login: keycloak.onAuthSuccess = () => {...} keycloak.init({ onLoad: 'login-required', pkceMethod: "S256", checkLoginIframe: false, }).then((authenticated: boolean)…
0
votes
1 answer

Keycloak - Redirect to "Confirm Logout" page when logging out after a page refresh

I'm currently using keycloak on a project and everything is working fine. With one exception... If I login, I am redirected to my project's page and if I then logout, everything works flawlessly. But if for some reason I refresh the page after…
0
votes
0 answers

Store origin for registration with keycloak

In my application I want to track from where the new users come with some kind of origin reference: user visits example.com and clicks on the registration button user is redirected to keycloak registration page with the exmaple.com reference the…
cre8
  • 13,012
  • 8
  • 37
  • 61
1
2