Currently there's no webhook event when user is successfully signed in from social connectors. Currently there are a couple of issues in the social sign-in flow:
Logto connector use code to exchange for an access token from social platform, and then use the access token to fetch userinfo from social platform. The access token is abandoned after use, but some users would like to store it and re-use it afterwards.
The userinfo fetched from social platforms must be mapped into Logto user table in database, so we are maintaining a json field mapping by hard-coding it in each social connector package. This is fine for a specific social platform connector, e.g. Google, Facebook, since each platform provide a fixed format of userinfo. But this is not so elegant for our standard social connectors, since the target social platform is unknown and thus the userinfo we get from them is also unknown.
Describe what you'd like Logto to have
Add a webhook event after user successfully signed in from social connectors.
Pass the access token and full userinfo fetched from social platform to the webhook payload.
This seems to be an elegant solution to solve the issues above. The developer can store the full userinfo and access token on their own server/storage and re-use it afterwards.
This also helps improve the userinfo mapping mechanism since the developer can always use management API to update user data in Logto DB.
What problem did you meet?
Currently there's no webhook event when user is successfully signed in from social connectors. Currently there are a couple of issues in the social sign-in flow:
code
to exchange for an access token from social platform, and then use the access token to fetch userinfo from social platform. The access token is abandoned after use, but some users would like to store it and re-use it afterwards.Describe what you'd like Logto to have
This seems to be an elegant solution to solve the issues above. The developer can store the full userinfo and access token on their own server/storage and re-use it afterwards. This also helps improve the userinfo mapping mechanism since the developer can always use management API to update user data in Logto DB.