Login: no guest option; every user signs in with a phone number

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-05 17:38:18 +03:30
parent 1025321b5f
commit af2e1f57dd
3 changed files with 4 additions and 47 deletions

View File

@@ -24,21 +24,8 @@ export const store = {
};
export const KEYS = {
deviceId: 'deviceId',
onboarded: 'tadrisino.onboarded',
conversationId: 'tadrisino.conversationId',
sound: 'tadrisino.sound',
referralCode: 'tadrisino.referralCode',
} as const;
/** شناسه‌ی ثابتِ این مرورگر برای ورودِ مهمان. */
export function getDeviceId(): string {
let id = store.get(KEYS.deviceId);
if (!id) {
id = globalThis.crypto && 'randomUUID' in crypto
? crypto.randomUUID()
: `${Date.now()}-${Math.random().toString(36).slice(2)}`;
store.set(KEYS.deviceId, id);
}
return id;
}