Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 401 Unauthorised Error because of an old auth token used during coming back from study to studies list. #4185

Closed
pavel-kaiko opened this issue May 29, 2024 · 5 comments
Assignees
Labels
fixed-in-dev-await-release This issue is fixed in master (viewer-dev) but we are pending testing for release (viewer.ohif.org)

Comments

@pavel-kaiko
Copy link
Contributor

Describe the Bug

If we use authentication, such as Keycloak, with OHIF, we encounter an issue when returning from the study to the study list. Instead of returning, we encounter the 401 Error and are redirected to the /not found server URL. This happens if we spend with study more than 5 minutes (token refresh time).

Based on our investigation, the application uses an outdated token. It works as expected if we manually copy the latest refreshed token from the network tab and make a network call.

Steps to Reproduce

  1. Use OHIF with authentication.
  2. Go to the study page
  3. Stay on a study page longer than the token refresh time.
  4. Go to the studies list.

The current behavior

When we go to the studies list after a time longer than the token refresh cycle, we get the 401 Error.

The expected behavior

The OHIF application should update the token in the request properly, and we should be able to access the studies list without any issues.

OS

macOS 14.5 (23F79)

Node version

v18.20.3

Browser

125.0.6422.113 (Official Build) (arm64)

@pavel-kaiko pavel-kaiko added the Awaiting Reproduction Can we reproduce the reported bug? label May 29, 2024
@sedghi
Copy link
Member

sedghi commented May 29, 2024

The current state of OHIF utilizes the Implicit Flow. I have a plan to migrate our authentication to the Authorization Code with Refresh Token flow, allowing a refresh token to be used for maintaining the signed-in state.

@pavel-kaiko
Copy link
Contributor Author

Thanks, @sedghi, for picking this up.

@sedghi sedghi added Bugs Bug reported, reproducible, and verified. Planned / In Progress and removed Awaiting Reproduction Can we reproduce the reported bug? Bugs Bug reported, reproducible, and verified. labels Jun 6, 2024
@james-hanks
Copy link

related #4101

@sedghi sedghi added fixed-in-dev-await-release This issue is fixed in master (viewer-dev) but we are pending testing for release (viewer.ohif.org) and removed Planned / In Progress labels Jul 9, 2024
@sedghi
Copy link
Member

sedghi commented Jul 9, 2024

Fixed here #4234

@sedghi
Copy link
Member

sedghi commented Nov 13, 2024

We released OHIF 3.9 which address this issue

@sedghi sedghi closed this as completed Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-dev-await-release This issue is fixed in master (viewer-dev) but we are pending testing for release (viewer.ohif.org)
Projects
None yet
Development

No branches or pull requests

4 participants