Anvil Community Forum

Login_with_google() shouldn't create new accounts

anvil.users.login_with_google() does not currently do as the API documentation describes when someone logs in with an email address not already in the Users table. When there is no record of such a user, it does not return None (and does not raise any exception) but rather creates a new Users row for the email address and returns that user.

And, if “New user accounts can be used right away,” it also logs the new user in. This behavior can be seen in the demo provided here:

Related, discussing a case in which new user accounts are not automatically enabled: