Shopify / shopify-app-template-node

MIT License
860 stars 393 forks source link

shopify-app-remix get authenticated user details #1301

Closed boxedcode closed 9 months ago

boxedcode commented 9 months ago

Hi.

Currently, when authenticating a Shopify Remix app with authenticate.admin(request) with useOnlineTokens set to true, the session only contains the authenticated users id. I've had a look at the Admin API reference for graphql and rest and there doesn't appear to be a request to fetch the users details.

For some context, I have an app where I want to display a timeline of events for actions performed within the app, e.g.

Settings last updated by Joe on Oct 13, 2023 at 14:23

where Joe is a user who authenticated with my app.

How would I obtain Joe's name?

Thank you.

boxedcode commented 9 months ago

I realised I opened the issue against the wrong repo, I've moved it here instead: https://github.com/Shopify/shopify-app-js/issues/472