Social login - Google SSO Error 400

I’m a new Nextcloud user and I’m trying to start a Social login app that uses google account authorization.
I followed the instructions:

my domain is
in Credentials I have set up
Authorized JavaScript origins:
Authorized redirect URIs:

In Nextcloud social login I then put “client ID” and “client secret” in the google field.
Next, in /var/snap/nextcloud/31908/nextcloud/config/config.php
I set

overwrite.cli.url' => ''

and restarted “snap.nextcloud.apache.service

When I try to log in via the google button, it redirects me to a page with a message:

Access blocked: This app’s request is invalid

You can’t sign in because this app sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error
If you are a developer of this app, see error details.
Error 400: redirect_uri_mismatch

I tried to find a solution somewhere but failed. Can anyone point me in the right direction and tell me what this might be?

Google Integration for migration works like a charm.

Thanks a lot