A way to know if a user is doing a sign in or sign up from google login

Hey Guys , is there a way to know if a user is doing a sign in or sign up from google login ?
and is it possible to send custom data in the sign up process like (referrer ID).

You can see here an example of how to register runtime functions that trigger and check if a user is a new signup when they authenticate. The example attaches to device-based authentication but you can do the same thing for Google or any other authentication type.

It may be possible to send through custom data along with a request to authenticate, the server allows you to set arbitrary KV string pairs that will also be available in the runtime. What do you need to do with this referrer ID or other data you might set? Will you store it in the database, or forward it somewhere else?