40 questions
0
votes
0
answers
40
views
keycloak-js with Nuxt: URL fragments not removed after login, authentication lost/blank page displayed on page reload with URL fragments
I'm using keycloak-js in a Nuxt 4 application for authentication. After login, I am redirected back to my page, but the URL contains session-related query parameters (like ?code=...&state=...&...
1
vote
1
answer
129
views
KeycloakService.init() returns undefined
Whenever I add my Keycloak app initializer to my angular 17 project it returns undefined.
Keycloak is running in a docker container locally.
The administrator console is working and I have set up my ...
1
vote
0
answers
288
views
Angular 19 + Keycloak: TypeError: A is not a constructor after production build (works in dev)
I am trying to setup an angular (19) app, within an Nx project, with keycloak authentication. The problem I am facing is that, after successfully building the app, I get the following error in the ...
2
votes
0
answers
79
views
Do I need two Keycloak clients for Google login (via Keycloak JS) and direct username/password login in a single realm?
I have a backend written in Java and a frontend in ReactJS, where I am using Keycloak for authentication. My frontend handles two types of login flows:
Google Login via Keycloak Identity Provider
...
1
vote
1
answer
612
views
How to handle SSR with provideKeycloak in Angular's appConfig?
I am working on an Angular application with SSR, and I'm trying to upgrade my project to angular 19. I'm using the new keycloak-angular provideKeycloak for authentication.
My current configuration ...
0
votes
0
answers
221
views
Keycloak js issues with isTokenExpired and updateToken
Im having some issues with Vue and Keycloak, I might understand something wrong about Keycloak which could cause the issues.
So I have a Login page by myself (I dont want to use Keycloaks sso) where ...
1
vote
3
answers
724
views
How to retrieve the code verifier using Keycloak from Angular
I am trying to develop an application with Angular as front, and Java as backend.
I need to login via Keycloak, and then send the received code to the back, to generate the token and store it in the ...
1
vote
1
answer
747
views
How to Register Users in Keycloak Using Keycloak-js
I'm building a Next.js application and I have implemented a custom registration page for users. I want to use Keycloak-js to handle user registration directly within the Next.js app, allowing for a ...
1
vote
1
answer
1k
views
keycloak-angular with standalone components this._instance undefined causing TypeError on login()
I'm attempting to setup keycloak-angular in a v18 SPA following this approach which seems to have had historic success. When calling the login method keycloak.login() I receive the following error ...
1
vote
0
answers
248
views
OfficeJS - Outlook Web Add-in using OpenId Authentication
I've a VSTO Add'In running in Outlook to integrate some emails with a Web Application in .NET Framework 4.8 that uses openid authentication.
Now, Microsoft released the new version of Outlook that no ...
0
votes
0
answers
322
views
Keycloak duplicate session issue
I have two Applications. On running on
example.com and another running on example.com/insurance/
I am using Keycloak IDP. The application running on /microinsurance/ is an Angular app 17.
In keycloak ...
1
vote
1
answer
340
views
NuxtJS + keycloak-js: frontend doesn't render the correct value
I have a Nuxt3 app which I want to secure with Keycloak.
For the integration, I use the keycloak-js library, which is defined as a plugin:
plugins/keycloak.client.ts
import Keycloak from 'keycloak-js';...
0
votes
0
answers
247
views
redirect to login page fails if token refresh fails using Keycloak.js
I'm encountering an issue with Keycloak in my React application. When the token is no longer valid and a refresh is not possible, a proper logout or redirect to the login page fails. If the logout ...
1
vote
1
answer
554
views
After keycloak login page "Cannot match any routes. URL Segment: '&iss'"
I have an angular application authenticating using keycloak, keycloak-angular and keycloak-js. It was working good but recently it started to throw below error on the console.
core.mjs:6484 ERROR ...
1
vote
1
answer
2k
views
(keycloak-js) Failed to initialize adapter, keycloak.init doesn't work
I'm using npm packet keycloak-js in vue 3 app.
Keycloak server and keycloak-js with same versions 24.0.2
import Keycloak from 'keycloak-js'
let initOptions = {
url: 'https://address'
realm: '...
1
vote
0
answers
291
views
keycloak-js initialization using Angular
I have been integrating keycloak-js and angular to achieve the following scenario in a multitenant application:
The /signing page is public (Without Guard rules) and displays a form were the user ...
1
vote
0
answers
133
views
Dockerized Application with React Frontend Keycloak Authentication Issuer
i am developing a fullstack application where i run the already developed backend in docker containers with FastAPI and keycloak with docker.
The issue now is that the Authorization via token from the ...
2
votes
3
answers
5k
views
Keycloak initialization issue in React: "A 'Keycloak' instance can only be initialized once"
I'm encountering an error when attempting to initialize Keycloak in my React application. The error message states:
Failed to initialize adapter: Error: A 'Keycloak' instance can only be initialized ...
2
votes
0
answers
503
views
How to add landing page to Vue app secured by Keycloak
I have a Vue app that is secured by Keycloak. If user is not authenticated with Keycloak then every request is being redirected to Keycloak login and after a successful login the user is redirected to ...
1
vote
0
answers
103
views
cors blocking keycloak auth endpoint in express server middleware
I'm getting a cors error when trying to calling a keycloak.protected endpoint.
I'm calling it from a svelte front-end app. The middleware is running on an express server.
Here's the full project code:
...
0
votes
1
answer
2k
views
How to re-run Keycloak JavaScript adapter check-sso
I'm using Keycloak JavaScript adapter in my single page web app. I execute
adapter = new Keycloak({
url: ENV.APP.KEYCLOAK_URL,
realm: ENV.APP.KEYCLOAK_REALM,
clientId: ENV.APP.KEYCLOAK_CLIENT_ID,...
0
votes
2
answers
3k
views
How can I configure a React application so that my Keycloak login comes after I click on a link?
I have a React applicaion created with create-react-app in which I have a simple routing scheme. The intent of this routing scheme is to allow for an user to click on a button to redirect to a ...
0
votes
1
answer
71
views
.$ notation in nuxt3 and accessing it
I am using keycloak-js in my Nuxt3 app. There is this line in the plugin code ...
app.$keycloak = keycloak;
How can I access the value stored in app.$keycloak in my pages (pages/*.vue)?
Of specific ...
0
votes
1
answer
485
views
Web application using Angular 15 and Keycloak 20.0.5 | Redirects to the login page after a page refresh
I'm developing a web application using Angular 15 and Spring Boot. As the IAM solution we are using Keycloak(20.0.5). We have created a public client for the web application (web-application). We have ...
0
votes
0
answers
1k
views
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"...
0
votes
0
answers
3k
views
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 ...
0
votes
1
answer
1k
views
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 ...
1
vote
0
answers
104
views
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 ...
0
votes
1
answer
4k
views
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 ...
3
votes
0
answers
295
views
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": ...
3
votes
2
answers
23k
views
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 ...
1
vote
1
answer
1k
views
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 ...
1
vote
0
answers
688
views
Cookies are blocked by Brave when using keycloak [closed]
I have a running Keycloak instance on auth.example.com and my app is running on example.io.
Brave Shield is blocking CORS cookies, so the cookie is not sent to the /protocol/openid-connect/token/ and ...
1
vote
2
answers
2k
views
keycloak.authenticated is alway false even after successful login in @react-keycloak/web
I have a very simple react app and I want to add keycloak authentication to it's pages. I'm using following versions
react v18
keycloak 18.0.0 (with quarkus)
react-keycloak/web: 3.4.0
keycloak-js: 20....
1
vote
1
answer
657
views
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 ...
3
votes
3
answers
8k
views
React-Keycloak keeps refreshing
I am trying to use keycloak to secure a React application.
I am using two packages: React-keycloak and keycloak-js.
This is my keycloak provider
<ReactKeycloakProvider
authClient={...
-2
votes
1
answer
698
views
What is the proper angular keycloak version to use with keycloak-js 18.0.0 while I have angular-js 1.6.0 in my application?
When a user attempts logout/SIGNOUT from GUI using the SIGNOUT button provided in GUI, SIGNOUT is not happening and user gets an error page stating ‘Invalid parameter: redirect_uri’
Angular-js: 1.6.0
...
1
vote
0
answers
2k
views
initialized keycloak instance unable to automatically authenticate in PKCE
I have a react application that using keycloak for some protected routes. I am creating a new keycloak instance with the following json :
{
"realm": "demo",
"auth-server-...
3
votes
1
answer
7k
views
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&...
1
vote
3
answers
2k
views
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.