Skip to content

Commit

Permalink
Add platform check for ConvexAuthProvider's storage (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwyx authored Jan 3, 2025
1 parent f7d0334 commit 757023d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/pages/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ instructions above.

<Steps>
### Install the NPM library

```sh
npm install @convex-dev/auth @auth/[email protected]
```
Expand Down Expand Up @@ -297,7 +297,14 @@ const secureStorage = {

export default function RootLayout() {
return (
<ConvexAuthProvider client={convex} storage={secureStorage}>
<ConvexAuthProvider
client={convex}
storage={
Platform.OS === "android" || Platform.OS === "ios"
? secureStorage
: undefined
}
>
<Stack>
<Stack.Screen name="index" />
</Stack>
Expand Down

0 comments on commit 757023d

Please sign in to comment.