Skip to content

Commit

Permalink
Merge pull request #480 from Shopify/v3_authenticate_public
Browse files Browse the repository at this point in the history
V3 authenticate public
  • Loading branch information
byrichardpowell authored Oct 25, 2023
2 parents 094dc35 + f34eefd commit 5d7b328
Show file tree
Hide file tree
Showing 8 changed files with 272 additions and 147 deletions.
29 changes: 29 additions & 0 deletions .changeset/spotty-teachers-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
'@shopify/shopify-app-remix': minor
---

Added v3_authenticatePublic feature flag to remove `authenticate.public(request)`.

Apps can opt in to the new future at any time, so this is not a breaking change until version 3.

<details>
<summary>See an example</summary>

Without the `v3_authenticatePublic` future flag the deprecated `authenticate.public(request)` is supported:

```ts
await authenticate.public.checkout(request);
await authenticate.public.appProxy(request);

// Deprecated. Use authenticate.public.checkout(request) instead
await authenticate.public(request);
```

With the `v3_authenticatePublic` future flag enabled the deprecated `authenticate.public(request)` is not supported:

```ts
await authenticate.public.checkout(request);
await authenticate.public.appProxy(request);
```

</details>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ type TestConfig<Overrides extends Partial<AppConfigArg>> =
Overrides & {
// Create an object with all future flags defaulted to active to ensure our tests are updated when we introduce new flags
future: {
v3_authenticatePublic: DefaultedFutureFlag<
Overrides,
'v3_authenticatePublic'
>;
v3_webhookAdminContext: DefaultedFutureFlag<
Overrides,
'v3_webhookAdminContext'
Expand All @@ -42,6 +46,7 @@ export function testConfig<Overrides extends Partial<AppConfigArg>>(
...overrides,
future: {
v3_webhookAdminContext: true,
v3_authenticatePublic: true,
...(overrides.future as Overrides['future']),
},
};
Expand Down
Loading

0 comments on commit 5d7b328

Please sign in to comment.