How to restrict Google Social Login to registered users?

Hi !
I have installed the Social Login app on my Nextcloud 18.0.4.
Anybody with a Google account can now register through his identifiers, it works.
Now, I want to restrict access to pre-registered users, so I disabled the automatic creation of new users, and now I must first register them : this means I must know which user name Google provides to Nextcloud. That’s where I got stuck.

I have tried various possibilities, like john@gmail.com, John, etc., all of them where rejected.
That’s until the server sent me yesterday a notice that user “google-XXXX” had tried to login, so I tried this user name and it worked.

My question is : where do I ask a Gmail user to look in his account for this ID “google-xyz” so that I can pre-register him ? I can’t find this info.

2 remarks :

  • the app Social Login should just accept gmail addresses as user names.
  • the weird part is that today my Nextcloud doesn’t send me Google login failures anymore.

I suspect this is not actually found on Google, and rather this is something the app does to distinguish user names that came from a particular social platform.

What did this user name actually look like?

Not all gmail addresses are @gmail.com, so it wouldn’t necessarily know that they are Google logins.

Hi Karl, thanks for the answer !

When the gmail user tries to register through Google, the Nextcloud log shows “login failed: g...0@gmail.com (Remote IP: …)”.
So the Social Login app knows the email address trying to register, but still, if I pre-register this user with his email address, he won’t be able to login.