-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[shopify-app-remix] get authenticated user details #472
Comments
@boxedcode there should be an OAuth redirect to install the app (offline token) and then redirect again to authenticate the user (online token). The result should include both the offline and online token, with the user info under What session storage are you using? |
@joelvh Thanks for your response, appreciate it. I'm using |
I just went through the flow again, and the only data that appears to be populated for the session is the users id,
The default mysql schema for the shopify-app-remix template is
and the documentation here reinforces the fact that only the |
Hey 👋 Thanks for opening an issue, and sorry this functionality doesn't exist right now. I'm going to close this issue as a duplicate of Shopify/shopify-app-template-remix#366 For context, we don't make this the default because we don't want an app to store sensitive PII information unless it has a reason to do so. Storing this information by default would increase the maintenance overhead of all apps, even though most apps don't need it. But! I do appreciate there are very valid reasons why this information is useful, and you've written up a good use case here, thank you! We should make this much more possible than it is right now, but we need to chat to a few people internally to see how. |
Thank you for your reply and confirming the current status of that functionality. I shall be patiently awaiting the conclusion of your internal discussions. |
Any news on this? I would like to retrieve the user locale to translate my app according. I can see from the types I should be able to get it via the |
If using Remix template, check this: In my case I used in the app.jsx loader: const locale = new URL(request.url).searchParams.get('locale'); |
Overview
Hi.
Currently, when authenticating a Shopify Remix app with
authenticate.admin(request)
withuseOnlineTokens
set totrue
, the session only contains the authenticated users id. I've had a look at the Admin API reference forgraphql
andrest
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.
The text was updated successfully, but these errors were encountered: