diff --git a/packages/shopify-app-remix/src/server/authenticate/admin/strategies/__tests__/token-exchange/authenticate.test.ts b/packages/shopify-app-remix/src/server/authenticate/admin/strategies/__tests__/token-exchange/authenticate.test.ts index 563288e299..4b4a3711d8 100644 --- a/packages/shopify-app-remix/src/server/authenticate/admin/strategies/__tests__/token-exchange/authenticate.test.ts +++ b/packages/shopify-app-remix/src/server/authenticate/admin/strategies/__tests__/token-exchange/authenticate.test.ts @@ -123,7 +123,7 @@ describe('authenticate', () => { const shopify = shopifyApp(config); const {token} = getJwt(); - await mockInvalidTokenExchangeRequest('invalid_subject_token'); + await mockInvalidTokenExchangeRequest('invalid_subject_token_type'); // WHEN const response = await getThrownResponse( @@ -154,7 +154,7 @@ describe('authenticate', () => { const shopify = shopifyApp(config); const {token} = getJwt(); - await mockInvalidTokenExchangeRequest('invalid_subject_token'); + await mockInvalidTokenExchangeRequest('invalid_subject_token_type'); // WHEN const response = await getThrownResponse( diff --git a/packages/shopify-app-remix/src/server/authenticate/admin/strategies/token-exchange.ts b/packages/shopify-app-remix/src/server/authenticate/admin/strategies/token-exchange.ts index 0d3909d1cc..b9928b8ddc 100644 --- a/packages/shopify-app-remix/src/server/authenticate/admin/strategies/token-exchange.ts +++ b/packages/shopify-app-remix/src/server/authenticate/admin/strategies/token-exchange.ts @@ -126,7 +126,7 @@ export class TokenExchangeStrategy error instanceof InvalidJwtError || (error instanceof HttpResponseError && error.response.code === 400 && - error.response.body?.error === 'invalid_subject_token') + error.response.body?.error === 'invalid_subject_token_type') ) { throw respondToInvalidSessionToken({ params: {api, config, logger},