apache / apache/camel-karavan

Logout issues when using oidc along with keycloak.

Open
#1,515 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
594
Forks
215
Avg merge
5d 11h
Merged PRs (30d)
2

Description

### Describe the bug

I recently tried to integrate keycloak along with my local instance of karavan. The login works fine but there are two identified issues related to logout.

- When the logout button is clicked, the Main.tsx component starts to re-load **before the keycloack session** can terminate. Hence this presents the user again with the landing page
- When I terminate my session from keycloak admin, the user **remains logged in** until the tab is refreshed (Control + R).

https://github.com/user-attachments/assets/8a605dbb-dd98-48ae-a452-a474d6076b64

Proposed solution:
- Adding await in `karavan-app/src/main/webui/src/api/SsoApi.tsx/logout`.
- Make a session status endpoint call at regular intervals.

### Steps to reproduce the behavior

1. Set-up [keycloak](https://www.keycloak.org/downloads).
2. Add the necessary oidc related property placeholders inside `karavan/src/main/resources/application.properties`
3. Build karavan using oidc profile
```
mvn clean package -f karavan-app -Dquarkus.profile=oidc
```

4. Login and then try logging out.

### Variant

Web Application

### Container Management (if applicable)

None

### Operating System (if applicable)

Linux

### Version

4.10.2

### Relevant log output

```shell

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with karavan-app/src/main/webui/src/api/SsoApi.tsx and its logout flow, then inspect Main.tsx for reload behavior. Reproduce with the OIDC profile using the Maven command in the issue and a local Keycloak instance. Done means logout waits for Keycloak session termination and an admin-side session termination is reflected without manually refreshing the tab.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.