Profile Information of users logged with Google, Facebook, Azure, etc

Hi all
I am logging in with google, but the only information returned is the email.
I also tried to specify a ‘profile’ scope in the

result = anvil.users.login_with_google('profile')

but result continues to be a Users table row, with just the email.
I’d like to retrieve other profile information like Name, Surname, etc.
The same when user logs with Facebook / Microsoft authentication.

Is there an Anvil’s built-in way to do that or I need to manage all of those services’ oAuth2.0 APIs?

Thanks and BR

I believe you’ll need to have your own app id and client key to connect to the google rest api in order to customise the google authentication experience and get profile information beyond just the email.

https://anvil.works/docs/integrations/google/linking-google-and-anvil

https://anvil.works/docs/integrations/google/google-rest-apis

Anvil has some useful wrappers around these APIs. The same is true of the Facebook/Microsoft oauth.

3 Likes

Thanks that is exactly what I was looking for.
I swear I looked in the docs but somehow my eye didn’t catch those sections.
My fault, thank you.