RocketChat / RocketChat/Rocket.Chat

custom script for Keycloak auth is fully working?

Open
#30,380 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

when i use this script for SSO its work and it logout completely, but redirect happens twice

Steps to reproduce:

I have workaround it by:

  1. Go to "Administration -> Layout -> Custom scripts
  2. In "Custom Script for Logout Flow" add
window.location.href = "https://<keycloak_url>/auth/realms/<realm>/protocol/openid-connect/logout?redirect_uri=https%3A%2F%2F<chat_url>";
Actual behavior:

When i logout from Rocket,the homepage is get twice once for scripts another for default request rocket chat.

Expected behavior:

When I logout Rocket, I'm redirected to the homepage once

Originally posted by @emikolajczak in https://github.com/RocketChat/Rocket.Chat/issues/24844#issuecomment-1069106547

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Keycloak SSO logout flow using the Administration → Layout → Custom scripts setting and the reported Custom Script for Logout Flow. Trace the logout and redirect requests to determine why the homepage loads twice; done means logout redirects to the homepage exactly once.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.