OK, I have identified the problem.
When you create the user manually as an external user and even if the user is authenticated by Google with all the correct claims, the table CMS_ExternalLogin is not updated accordingly. No record in this table is created for this authenticated external user created manually in the admin site.
This table is updated only when CreateExternalUser() is used.
I think that ExternalLoginSignInAsync() is checking that the user exists in this table and since it was created by hand, the function return a failed result.
It doesn’t seem to be a correct behaviour. I should be able to create an external user by hand. Is there a function which could update the external login table when the user has been authenticated by Google?
S.