Storing info available on access token (jwt payload) received upon successful Google authentication

I am using Google authentication provider with Open Id Connect. Following the latest Google Identity Service. At the client level using realm-web SDK with React Js.

Context:
After user consent, google sdk callback with user credentials(JWT), which I am passing to Credentials.google function. The output of the function is credentials, which in turn, is used to perform user login through app.logIn(). This flow is similar to Google one tap flow as described in the mongodb documentation.

Problem:

  1. How do I store the user’s information available in the credentials payload in my user’s custom data collection?

Tried Till Now:
Enabled authentication trigger on CREATE and LOGIN, but the parameter of the functions (running as realm app backend) called on CREATE and LOGIN event, is not giving access to the payload data.