Skip to content

Releases: Shopify/shopify-app-js

@shopify/[email protected]

02 Oct 19:16
15798af
Compare
Choose a tag to compare

Minor Changes

  • 9cb261e: Fixed saving/loading online access info and associated user data for redis
The new session will include the following data:
 {
    id: 'online_session_id',
    shop: 'online-session-shop',
    state: 'online-session-state',
    isOnline: true,
    scope: 'online-session-scope',
    accessToken: 'online-session-token',
    expires: 2022-01-01T05:00:00.000Z,
    onlineAccessInfo: {
      associated_user: {
        id: 1,
        first_name: 'online-session-first-name'
        last_name: 'online-session-last-name',
        email: 'online-session-email',
        locale: 'online-session-locale',
        email_verified: false,
        account_owner: true,
        collaborator: false,
      },
    }
  }

You will be able to access the user information on the Session object:

const {admin, session} = await authenticate.admin(request);

console.log('user id', session.onlineAccessInfo.associated_user.id);
console.log('user email', session.onlineAccessInfo.associated_user.email);
console.log(
  'account owner',
  session.onlineAccessInfo.associated_user.account_owner,
);

@shopify/[email protected]

02 Oct 19:16
15798af
Compare
Choose a tag to compare

@shopify/[email protected]

02 Oct 19:16
15798af
Compare
Choose a tag to compare

@shopify/[email protected]

02 Oct 19:16
15798af
Compare
Choose a tag to compare

Patch Changes

  • d2e3201: Updated mysql2 dependencies

@shopify/[email protected]

02 Oct 19:16
15798af
Compare
Choose a tag to compare

@shopify/[email protected]

02 Oct 19:16
15798af
Compare
Choose a tag to compare

@shopify/[email protected]

02 Oct 19:16
15798af
Compare
Choose a tag to compare

@shopify/[email protected]

02 Oct 19:15
15798af
Compare
Choose a tag to compare

@shopify/[email protected]

02 Oct 19:15
15798af
Compare
Choose a tag to compare

Patch Changes

  • d2e3201: Updated mysql2 dependencies

@shopify/[email protected]

02 Oct 19:16
15798af
Compare
Choose a tag to compare

Patch Changes