Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import SecureStore from expo.
React Native
import [1] from 'expo-secure-store';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Importing AsyncStorage instead of SecureStore
Using wrong module names like FileSystem or Clipboard
✗ Incorrect
SecureStore is imported from 'expo-secure-store' to securely save sensitive data.
2fill in blank
mediumComplete the code to save a value securely with SecureStore.
React Native
await SecureStore.[1]Async('userToken', 'abc123');
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using getAsync instead of setAsync to save data
Using save or store which are not valid methods
✗ Incorrect
Use setAsync to save data securely with SecureStore.
3fill in blank
hardFix the error in retrieving a value securely with SecureStore.
React Native
const token = await SecureStore.[1]Async('userToken');
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using setAsync instead of getAsync to retrieve data
Using save or store which are not valid methods
✗ Incorrect
Use getAsync to retrieve securely stored data.
4fill in blank
hardFill both blanks to delete a stored key securely.
React Native
await SecureStore.[1]Async('[2]');
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using removeAsync which does not exist
Using wrong key names
✗ Incorrect
Use deleteAsync with the key name to remove stored data.
5fill in blank
hardFill all three blanks to check if a key exists and retrieve it securely.
React Native
const value = await SecureStore.[1]Async('[2]'); if (value !== [3]) { console.log('Value found:', value); }
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'setAsync' instead of 'getAsync' to retrieve
Comparing with undefined instead of null
Using wrong key names
✗ Incorrect
Use getAsync to retrieve the value, check if it is not null to confirm existence.