Skip to content

Commit cf0ce3d

Browse files
authored
[Sample] remove auth requirement (#399)
remove the authentication requirment
1 parent 1c258ae commit cf0ce3d

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

sample/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export type RootStackParamList = {
103103
Cart: undefined;
104104
CartModal: undefined;
105105
Settings: undefined;
106-
BuyNow: {url: string; auth: string};
106+
BuyNow: {url: string; auth?: string};
107107
};
108108

109109
const Tab = createBottomTabNavigator<RootStackParamList>();

sample/src/components/BuyNowButton.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ export function BuyNowButton({
5757

5858
try {
5959
const auth = await fetchToken();
60-
if (!auth) {
61-
throw new Error('Authentication required for this sample app');
62-
}
6360

6461
let checkoutUrl: string;
6562

sample/src/screens/BuyNow/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export type BuyNowStackParamList = {
2-
Checkout: {url: string, auth: string};
2+
Checkout: {url: string, auth?: string};
33
Address: {id: string};
44
Payment: {id: string};
55
};

0 commit comments

Comments
 (0)