I have a QGIS project with many layers (inside multiple groups) with the same source (PostgreSQL).
When the project starts, for each of these layers to lead, it asks for the credentials which is the username and password of the database. Since all these layers use the same database, their credentials are identical and thus when the user enters the correct username/password for the first, it won't ask for it again and all the layers will be loaded.
But the problem is when the users does not have the correct username/password, the user clicks 'Cancel' on 'The Credential' windows hoping that it won't ask him again, but it asks again since there are multiple layers (100+). And the user can't even quit QGIS unless he clicks 'Cancel' 100+ times or kill QGIS from the Task Manager. Which is very annoying.
How can I fix this problem?