Skip to content

Commit cbae317

Browse files
committed
fix(mobile/storage): use valid SecureStore keys
SecureStore only allows alphanumerics, dots, dashes, and underscores — colons silently throw. Every key in the app used "qibla:..." and was failing on Android, which is why Recent mosques, Recent searches, prayer reminders, and the onboarded flag never persisted. Swap ":" for "." across the four storage modules.
1 parent 6c726ea commit cbae317

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/mobile/features/mosques/lib/recent-places-storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as SecureStore from "expo-secure-store";
22

3-
const KEY = "qibla:recent-place-searches";
3+
const KEY = "qibla.recent-place-searches";
44
const MAX = 10;
55

66
export type RecentPlace = {

apps/mobile/features/mosques/lib/recent-storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as SecureStore from "expo-secure-store";
22

3-
const KEY = "qibla:recent-mosques";
3+
const KEY = "qibla.recent-mosques";
44
const MAX = 8;
55

66
export async function getRecentMosqueIds(): Promise<string[]> {

apps/mobile/features/onboarding/lib/storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as SecureStore from "expo-secure-store";
22

3-
const KEY = "qibla:onboarded";
3+
const KEY = "qibla.onboarded";
44

55
export async function hasCompletedOnboarding(): Promise<boolean> {
66
try {

apps/mobile/features/settings/lib/settings-storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as SecureStore from "expo-secure-store";
22

3-
const PRAYER_REMINDERS_KEY = "qibla:prayer-reminders";
3+
const PRAYER_REMINDERS_KEY = "qibla.prayer-reminders";
44

55
export async function getPrayerRemindersEnabled(): Promise<boolean> {
66
try {

0 commit comments

Comments
 (0)