OpenID authentication is not using the redirect url in configuration file #1661

Closed
opened 2023-12-16 21:22:49 +00:00 by cosmoswafer · 5 comments

Description

I'm running the Vikunja under subdirectory and authenticate via NextCloud as OpenID provider. I've set the redirect url in the configuration file, e.g. https://hostname/vikunja/auth/openid/nextcloud. However, the actual redirect url which Vikunja sent to NextCloud is https://hostname/auth/openid/nextcloud, the subdirectory part is missing. How to configure the redirect url correctly?

Vikunja Frontend Version

Build from source code, version 0.21.0

Vikunja API Version

0.21.0

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

### Description I'm running the Vikunja under subdirectory and authenticate via NextCloud as OpenID provider. I've set the redirect url in the configuration file, e.g. `https://hostname/vikunja/auth/openid/nextcloud`. However, the actual redirect url which Vikunja sent to NextCloud is `https://hostname/auth/openid/nextcloud`, the subdirectory part is missing. How to configure the redirect url correctly? ### Vikunja Frontend Version Build from source code, version 0.21.0 ### Vikunja API Version 0.21.0 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
cosmoswafer added the
kind/bug
label 2023-12-16 21:22:49 +00:00
Owner

Did you configure the frontend url?

Did you configure the [frontend url](https://vikunja.io/docs/config-options/#frontendurl)?
Author

Yes I have configured it with the subdirectory:

$ sudo cat config.yml | grep frontendurl
  frontendurl: "https://<hostname>/vikunja/"

I've also configured the redirect uri and I'm not sure why the backend api server doesn't use it?

$ sudo cat config.yml | grep redirecturl
...
    redirecturl: "https://<hostname>/vikunja/auth/openid/nextcloud/"
Yes I have configured it with the subdirectory: ``` $ sudo cat config.yml | grep frontendurl frontendurl: "https://<hostname>/vikunja/" ``` I've also configured the redirect uri and I'm not sure why the backend api server doesn't use it? ``` $ sudo cat config.yml | grep redirecturl ... redirecturl: "https://<hostname>/vikunja/auth/openid/nextcloud/" ```
Owner

Seems like the redirect url on the frontend was built using only the host and protocol, not the sub path.

Should be fixed in e98e5a0d2f - please test with the next unstable frontend build if the problem went away.

Seems like the redirect url on the frontend was built using only the host and protocol, not the sub path. Should be fixed in https://kolaente.dev/vikunja/frontend/commit/e98e5a0d2f8d6d319c661ed79ca89780e9a2294f - please test with the next [unstable frontend build](https://drone.kolaente.de/vikunja/frontend/15615/2) if the problem went away.
Author

I've tested and it works well. Thank you!

And I'm interesting in why don't use the redirect url from the api server configuration?

I've tested and it works well. Thank you! And I'm interesting in why don't use the redirect url from the api server configuration?
Owner

Because when using the desktop app, the redirect url is different from the one you've configured. It's not the most ideal solution and might change in the future.

Because when using the desktop app, the redirect url is different from the one you've configured. It's not the most ideal solution and might change in the future.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1661
No description provided.