go-vikunja / vikunja

Mirror of vikunja from https://code.vikunja.io/api
GNU Affero General Public License v3.0
955 stars 65 forks source link

Documentation on todoist migration in the sample config is contradicting #302

Closed wucke13 closed 2 months ago

wucke13 commented 2 months ago

Description

Description

The config contains the following statements on the migration.todoist.redirecturl:

  1. The url where clients are redirected after they authorized Vikunja to access their todoist items.
  2. This needs to match the url you entered when registering your Vikunja instance at todoist.
  3. This is usually the frontend url where the frontend then makes a request to /migration/todoist/migrate with the code obtained from the todoist api.
  4. Note that the Vikunja frontend expects this to be /migrate/todoist

Now the information that can be deferred from it.

a. From statement 1. I can derive that this is the URL where clients are redirected to after they authorized in Todoist. Todoist calls this OAuth redirect URL (which precisely controls where Todoist redirects the user after they click authorize). b. From statement 2. I can derive, that this must be equal to the URL that I register with, which Todoist calls the App Service URL (see first screenshot, this is the only URL asked during registration). c. Statement 3. tells me that this URL must somehow cause the (Vikunja?) frontend to request /migration/todoist/migrate. So I would expect that there is some url, that when accessed, causes the frontend itself to make a request to migration/todoist/migrate. d. Statement 4. tells me, that this URL is expected to be /migrate/todoist.

From as per a. and b. we can derive that both OAuth redirect URL and App Service URL must have the same value, and as per d. we know that this value must be /migrate/todoist. Now c. tells us that when accessing /migrate/todois the frontend (?) will cause a request to migration/todoist/migrate. However, that is not happening, instead I land on https://vikunja.wucke13.de/migrate/todoist?code=<redacted>&state=<redacted> showing me Not found.

image

Questions

Relevant snippet from the sample config

https://github.com/go-vikunja/vikunja/blob/bf1c8c6119648184a3d55f5653f4f49618b20578/config.yml.sample#L230-L234

Vikunja Version

main/0.23.0 (Documentation that confuses me is on main branch, I run Vikunja 0.23.0)

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

Workflow to failure

image

image

image

dpschen commented 2 months ago

I didn't work on the OAuth part, so can't help you in depth here, but maybe this recent change of the frontend migration url has something to do with it.

Edit: after writing this I realised, that you are referring to the api endpoint, which afaik didn't change, so never mind.

kolaente commented 2 months ago

Clarified in https://github.com/go-vikunja/vikunja/commit/bf2d56c9d42d6beb023ac6ea4cc10c0db7e58a6c