Skip to content

fix redudant login prompt from eozilla app - #183

Merged
TejasMorbagal merged 3 commits into
mainfrom
TejasMorbagal/fix-redudant-interactive-login-for-app
Jul 31, 2026
Merged

fix redudant login prompt from eozilla app#183
TejasMorbagal merged 3 commits into
mainfrom
TejasMorbagal/fix-redudant-interactive-login-for-app

Conversation

@TejasMorbagal

@TejasMorbagal TejasMorbagal commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

added _effective_auth_type(): when a client config has auth_type="login" and already holds a resolved token (which is always true by the time show_app() runs), it's forwarded to the GUI as auth_type="token" instead of "login". The GUI's authType: "token" path just attaches the existing bearer token; "login" was making it discard that token and force a fresh interactive OAuth2/PKCE redirect.

Checklist (strike out non-applicable):

  • Changes documented in CHANGES.md
    * [ ] Related issue exists and is referred to in the PR description and CHANGES.md
    * [ ] Added docstrings and API docs for any new/modified user-facing classes and functions
    * [ ] Changes/features documented in docs/*
  • Unit-tests adapted/added for changes/features
  • Test coverage remains or increases (target 100%)

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@freds-dev freds-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Steps I did to verify:

  • Authenticating to the S2GOS Keycloak token endpoint with cuiman configure, using auth_type: login and client ID: cuiman.
  • Saving the resulting access token in a temporary local config.
  • Launching the app with that config via cuiman show-app.
  • Confirming the app connected to S2GOS immediately, without redirecting to Keycloak or prompting you to log in again.

Just one thing: After the token expired there is no refresh so the token won't work anymore and the requests return Jwt is expired.

@TejasMorbagal

TejasMorbagal commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM! Steps I did to verify:

* Authenticating to the S2GOS Keycloak token endpoint with `cuiman configure`, using `auth_type: login` and `client ID: cuiman`.

* Saving the resulting access token in a temporary local config.

* Launching the app with that config via `cuiman show-app`.

* Confirming the app connected to S2GOS immediately, without redirecting to Keycloak or prompting you to log in again.

Just one thing: After the token expired there is no refresh so the token won't work anymore and the requests return Jwt is expired.

Yes, refresh token won't work. The user has to re-login.

@freds-dev
freds-dev self-requested a review July 31, 2026 09:05
@TejasMorbagal
TejasMorbagal merged commit 8045334 into main Jul 31, 2026
2 checks passed
@TejasMorbagal
TejasMorbagal deleted the TejasMorbagal/fix-redudant-interactive-login-for-app branch July 31, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants