go-vikunja / vikunja

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

Restoring OpenID users is a problem #99

Closed aleprovencio closed 7 months ago

aleprovencio commented 7 months ago

Description

Hi,

I have my vikunja configured to use authelia's OpenID, and this is way I authenticate.

I was first surprised that I could not set a password for this account and also about the fact that it is not possible to link this account with other existing accounts.

I usually use this approach in other apps so I'm still able to log in without having to authenticate via authelia.

But anyways, authenticating with authelia was working fine, until I needed to restore the database from a backup.

The restoring process is fine, but when I try to connect to the restored account, vikunja creates a new one, so I'm locked out.

I've also tried changing the password for this account via the CLI, but that also results in an error.

Vikunja Frontend 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

kolaente commented 7 months ago

Just to confirm I understood you correctly: You restored your Vikunja instance from a backup and when you now try to log in again, you now have a new user instead of the existing one?

If that's the case, can you check if the issuer and subject in the users table are different for the old and new user?

aleprovencio commented 7 months ago

Yes it does create a new user, where issuer records are the same (authelia.mydomain) but subject ones are not.

kolaente commented 7 months ago

The subject is taken from the openID provider. If it's different in the database that means your provider has changed it.