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

Wrong redirect if already authenticated with SSO #766

Open
robertmx opened this issue Jan 20, 2024 · 1 comment
Open

Wrong redirect if already authenticated with SSO #766

robertmx opened this issue Jan 20, 2024 · 1 comment
Labels
bug Something isn't working priority: normal question Further information is requested

Comments

@robertmx
Copy link

Dear devs,

thank you very much for this app. I integrated Nextcloud with keycloak and see a redirect error if I am already authenticated with Keycloak.

Steps to reproduce:

  1. Get a valid session with keycloak by logging in to some other service on the same realm
  2. Access the nextcloud base url (https://xxx.tld/nextcloud/)
  3. Observe the following 302 redirects: (https://xxx.tld/nextcloud/login --> https://xxx.tld/nextcloud/apps/user_oidc/login/1 --> https://xxx.tld/nextcloud/index.php_oidc/login/1)
  4. The last redirect results in a 404 not found, because the URL does not exists. Note the index.php_oidc/login/1 part that looks wrong to me.

What I think is happening

user_oidc is checking with keycloak for authentication, realizes the session is already authenticated with keycloak, authenticates the user with nextcloud and immediately tries to redirect back to nextcloud. But somehow the redirect URL gets mangled.
This error does not occur when logging in directly with nextlcoud, e.g. with no prior authentication with keycloak.

Cheers
Robert

@edward-ly edward-ly added the bug Something isn't working label Sep 17, 2024
@edward-ly
Copy link
Contributor

Hi, can you confirm if this issue still persists on the latest versions of Keycloak/Nextcloud/user_oidc? If so, we can perhaps investigate the issue further.

Also, please note that running Nextcloud inside a domain subdirectory is not officially supported (if the example links you provided suggest that you are doing so).

@edward-ly edward-ly added question Further information is requested priority: normal labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: normal question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants