User info from social providers

How can i get the user profile data when using google OAuth? does better auth returns it out of the box or do i get the access token that i need to use and hit the social provider a api to get user info?
Solution:
only when the user is first created so it doesn't override any local changes.
Jump to solution
5 Replies
preAGIcoder
preAGIcoderOP2mo ago
@bekacru sorry to ping you, but can you help?
bekacru
bekacru2mo ago
Better Auth handles fetching and strong the userinfo. If you need to cutomize the behavior or store additional properties, you can use getUserInfo or mapUserToProfile
preAGIcoder
preAGIcoderOP2mo ago
does getUserInfo and mapUserToProfile trigger on signin too or just signup? because both of them are not being triggered when in signin @bekacru
Solution
bekacru
bekacru2mo ago
only when the user is first created so it doesn't override any local changes.
preAGIcoder
preAGIcoderOP2mo ago
gothca thanks

Did you find this page helpful?