Questions tagged [keycloak-angular]
35 questions
0
votes
0 answers
Angular Test for the Keycloak Angular Package
I'm new with the implementation of keycloak-angular package, everything is working but I need to write some test, and it's not clear how to approach this topic, I did some research and I wrote some tests but I need to call the keycloak method or I…

DevDuke
- 45
- 6
0
votes
0 answers
Version compatibility Matrix for Keycloak and Angular?
I want to integrate keyclock 21.1.2 which is the LTS version. I am not able to find which angular dependacy is compatible with the different versions of keycloak.
There is angular-keyclock package available in…

Onkar Marbhal
- 9
- 4
0
votes
0 answers
Keycloak-angular x-frame issue
I have the following issue after setting up Angular-keycloak:
Refused to display 'http://localhost:4200/' in a frame because it set 'X-Frame-Options' to 'deny'.
My Angular (app.module.ts) configuration is the following:
keycloak.init({
…

Cyril
- 161
- 2
- 22
0
votes
0 answers
Keycloak access token gets invalid even before the Access Token life span gets expired
i am using keycloak in my client application for Authentication and Authorization purpose. I configured the keycloak Tokens under Relams settings as below
SSO Session Idle - 8 - Hours
SSO Session Max - 10 - Hours
Access Token Lifespan - 5 -…

Lisa
- 655
- 3
- 10
- 34
0
votes
0 answers
keycloak-angular: Check if user is logged in before app is bootstrapped
I want to check if user logged in before the app is bootstrapped, so I add keycloak.isLoggedIn() in APP_INITIALIZER, but it always returns false even if user is logged in.
Need to clear local storage before login if a user is not authenticated. Or…

Ivan Bagaric
- 61
- 4
0
votes
1 answer
keycloak-angular with AngularElements and Standalone Component (no Authorization Header added to requests)
I have an angular app (and a nestjs backend) and I try to handle user login with the help of keycloak. As the buzzword rich question title states I have kind of a "weird" architecture.
I want to create a custom element with the help of angular…

andymel
- 4,538
- 2
- 23
- 35
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…

Diogo Pedrosa
- 1
- 1
- 4
0
votes
0 answers
Keycloak 401 (Unauthorized) Angular
I'm trying to set up a keylock with angular.
Everything works if in the keycloak admin panel I don't select settings "Access settings
" --> "Root URL" and "Home URL" in my client's settings.
If they are selected, then I get an error "error", I…
0
votes
1 answer
Login guard Keycloak and angular
I am using keycloak-angular in my project I want to implement a login guard to prevent authenticated users from navigating to public pages like the login page and register. I tried to implement it like below but it just redirects to the public…

Emz
- 475
- 1
- 7
- 16
0
votes
0 answers
How to determine whether a user has an active session with keycloak cordova adapter
Is there any method in Keycloak with Cordova to determine, whether a user has an active session before executing login()?
I'd like to support two basic scenarios in my mobile app, which uses the built-in Keycloak Cordova adapter with the in-app…

RobYed
- 71
- 1
- 9
0
votes
1 answer
keycloak-angular wrong redirect
I try to setup Keycloak to protect my angular SPA.
In Keycloak I have setup a realm and two clients (for frontend and backend).
I want all users of the app to be logged in, so I initialize Keycloak with onLoad: 'login-required'.
When I load the SPA…

andymel
- 4,538
- 2
- 23
- 35
0
votes
0 answers
Angular 14 - upgrade issues
I am trying upgrade my project to angular. My package.json looks like below
"dependencies": {
"@angular/animations": "^14.1.3",
"@angular/cdk": "^14.1.3",
"@angular/common": "^14.1.3",
"@angular/compiler": "^14.1.3",
"@angular/core":…

nani21984
- 911
- 2
- 13
- 21
0
votes
2 answers
How to check if Keycloak OTP 2FA is enable in Angular?
I´m new in keycloak.
We have an angular application that use keycloak service to log in and to get some user attributes that we already configured but now i have to check if keycloak OTP required action is enable because if it´s enable I had to show…

jhoann vanegas
- 1
- 1
0
votes
0 answers
Exclude specific page urls from Keycloak Authentication
In my angularjs application, I am using keycloak-js and integrated authentication via keycloak.
The users can join our application via invite. A unique invite url will be sent & the user will visit this page & provide their personal details to join…

Uma Ilango
- 968
- 4
- 16
- 31
0
votes
2 answers
Unable to initialize keycloak in angular with Promise with dynamic conf
I would like to call a webservice beforce initializing keycloak frontend component from keycloak-angular library to make keycloakconf dynamic. The backendService.keycloakConfig() webservice returne the correct value but the isInitialized variable is…

batmaniac
- 392
- 4
- 22