Can anyone explain how to get the email address, first name, and last name of the authenticated admin user from a Shopify app created in Node using the v3 CLI?
I previously used session.onlineAccessInfo.associated_user.email , session.onlineAccessInfo.associated_user.first_name, and session.onlineAccessInfo.associated_user.last_name with the v2 CLI code, but after enabling online tokens in the v3 CLI code, id is the only property I'm seeing on associated_user.
Requires read_users access scope. Also: The app must be a finance embedded app or installed on a Shopify Plus or Advanced store. Contact Shopify Support to enable this scope for your app.
I don't need this data for anyone other than the authenticated admin user. How else can I retrieve this information? Is there a way to get this data populated on session.onlineAccessInfo.associated_user again as it was in the past?
It turns out this data was being passed, but the default session storage options discard everything but the user id. The solution is to use either the out-of-the-box MemorySessionStorage option or implement your own custom storage.
Any particular reason for this? I am wanting to automatically register a user when they install the app and this is the only place that I can see that provides the name and email of the user installing the application.