Skip to content

Commit 920f201

Browse files
committed
Use secure storage for storing sensitive data
1 parent c174258 commit 920f201

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function Navigation() {
168168
<Stack.Screen name='Login' component={Login} options={GestureEnabled} />
169169
<Stack.Screen name='Signup' component={Signup} options={GestureEnabled} />
170170
<Stack.Screen name='Verify' component={Verify} options={GestureEnabled} />
171-
<Stack.Screen name='Home' component={Home} options={NO_ANIMATION} />
171+
<Stack.Screen name='Home' component={Home} options={SMOOTH_ANIMATION} />
172172
<Stack.Screen name='Test' component={Test} options={GestureEnabled} />
173173
<Stack.Screen name='AllUsers' component={AllUsers} options={GestureEnabled} />
174174
<Stack.Screen name='Logout' component={Logout} options={IOS_BOTTOM_STYLE} />

src/zustand/authStore.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import S from '@utils/storage'
1+
import S, { secureLs } from '@utils/storage'
22
import { create } from 'zustand'
33

44
type AuthStore = {
@@ -11,11 +11,11 @@ const authStore = create<AuthStore>((set) => ({
1111
token: S.get('token'),
1212
setToken: (token) => {
1313
set({ token })
14-
S.set('token', token)
14+
secureLs.set('token', token)
1515
},
1616
removeToken: () => {
1717
set({ token: undefined })
18-
S.remove('token')
18+
secureLs.delete('token')
1919
},
2020
}))
2121

0 commit comments

Comments
 (0)