Hi,
I built a GAS that, after installation, exchanges the OAuth token of the effective user with my backend using ScriptApp.getOAuthToken().
This process automatically registers the user if they haven’t been registered yet (or updates their token if they have).
It worked well for me in development, but in production, when I call getOAuthToken(), the result is tied to gsmte...@marketplacetest.net with a different user ID, instead of the effective user.
Why is it happening? Does exchanging tokens from the GAS to your backend with getOAuthToken is a best practice ?