How can I use a session token to streamline user login in AWS environment?

Topic summary

Checkout screen was moved to an AWS-hosted app using GraphQL on a different domain, which forces customers to re-enter their credentials after signing into Shopify. The goal is to eliminate this extra login and “hand over” the existing Shopify authentication to the AWS app.

Proposed flow:

  • Get the user ID from a session token (from the existing Shopify login).
  • Use that user ID to call the Shopify API and retrieve the customer’s information.

The author believes this should work based on documentation but is new to Shopify GraphQL and requests example code to implement it.

Status: Open request for confirmation and sample GraphQL code; no solutions or code snippets provided yet.

Summarized with AI on January 10. AI used: gpt-5.

Hi,

We have changed checkout screen, and this screen is created in our AWS environment which use GraphQL.

At this moment, our AWS account use different domain, so that users need to type their ID and password again. We would like to remove this additional steps. (When user sign in to Shopify, they have already type their ID and password, so we would like to hand over those.)

To consider this architecture, I think we use below steps.

  1. To get user id from session token.

  2. To use user id which we get from No.1 and call Shopify API to get user information.

From document basis, I think this works, but since I’m a new for Shopify GraphQL, and I’m not familiar with GraphQL code, if someone can provide sample code, is it possible to provide it to us?

Thank you!