Seems like there is an issue specific to my account as I cannot login to release-monitoring using the Fedora FAS openidc. Once I'm authenticated using the Fedora FAS id, I receive the following message once redirected to the release-monitoring application: "Error: There's already an account associated with your email, authenticate with openid." (I'm authenticating using openid actually).
It might be related to my attempt to identify using another openidc provider: (https://id.rpmfusion.org/openid/id/kwizart)
I would suggest to look at the release monitoring database to clean-up any duplicate entry...
IIRC, this issue might not be related to the recent migration, as It might be an older issue.
@zlopez can you take a look?
Metadata Update from @kevin: - Issue priority set to: Waiting on Assignee (was: Needs Review) - Issue tagged with: authentication, release-monitoring
We tried to troubleshoot this issue with kwizart in #fedora-admin channel and here is what we found.
The user with the same e-mail is already in users table, but this one is associated with openid instance (https://id.rpmfusion.org/openid/id/kwizart). He was able to connect using this openid provider, but to be able to connect with FAS we need to delete his existing account.
To do this I need someone with db access to delete user with id 0a87043e-4c9b-492c-b74d-c28c981a0842 from users table in Anitya. When this will be done the kwizart should be able to login with FAS account.
0a87043e-4c9b-492c-b74d-c28c981a0842
To help prevent this in the future I created two tickets in Anitya:
To enhance the error message - https://github.com/fedora-infra/anitya/issues/930
To add admins ability to delete the users from the user management screen - https://github.com/fedora-infra/anitya/issues/931
anitya=# select * from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; id | email | username | active | admin --------------------------------------+-------------------+----------------+--------+------- 0a87043e-4c9b-492c-b74d-c28c981a0842 | kwizart@gmail.com | NicolasChauvet | t | (1 row)
(1 row)
Metadata Update from @kevin: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
It doesn't seem to work...
"Error: There's already an account associated with your email, authenticate with openid."
Is there any other user_id using the same email ? kwizart@gmail.com ?
Metadata Update from @kwizart: - Issue status updated to: Open (was: Closed)
Oops. That second select was supposed to be a delete. :(
However:
anitya=# delete from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; ERROR: update or delete on table "users" violates foreign key constraint "social_auth_usersocialauth_user_id_fkey" on table "social_auth_usersocialauth" DETAIL: Key (id)=(0a87043e-4c9b-492c-b74d-c28c981a0842) is still referenced from table "social_auth_usersocialauth".
Hm, I thought the social auth table will be set to cascade delete. In this case we need to also delete entry in social_auth_usersocialauth tables.
social_auth_usersocialauth
Metadata Update from @pingou: - Issue assigned to pingou
Done:
anitya=# delete from social_auth_usersocialauth where user_id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; DELETE 1 anitya=# delete from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; DELETE 1
Confirmed fixed! Thanks !
Metadata Update from @kwizart: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)