Open julien-nc opened 1 year ago
I don't think there is an way around this issue - in contrast to the LDAP user provisioning, the OIDC provisioning does not list and create all available users. It only creates users not existing when the user logs in. Nextcloud has no way of telling whether or not an existing user still exists within the OIDC provider. You can circumvent this issue if you enable LDAP as user provisioning for nextcloud and use the same LDAP source for your OIDC provider. Then nextcloud has a way of telling a user is obsolete and you can remove everything using: (caveat, this removes user&data):
for i in $(php occ ldap:show-remnants | grep \\. | awk -F \| '{print $2 }' ); do
echo "Delete user: $i"
php occ user:delete $i
done
If a user exists as a DB one and then authenticates with user_oidc, the row in
oc_users
is still there. The user is then handled by 2 backends. So if the user_oidc user is deleted, the DB one still exists and can log in.How could we improve this?
One solution would be to let admins set a provider-specific setting flag to choose what happens when user_oidc finds a database user with the same id on OIDC login:
@juliushaertl