Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[Session] Restore emailAuthFactor and emailConfirmed from last session (#3939)

authored by

dan and committed by
GitHub
6e172b6c 55fdbc73

+7 -4
+7 -4
src/state/session/agent.ts
··· 1 - import {BskyAgent} from '@atproto/api' 2 - import {AtpSessionEvent} from '@atproto-labs/api' 1 + import {AtpSessionData, AtpSessionEvent, BskyAgent} from '@atproto/api' 3 2 4 3 import {networkRetry} from '#/lib/async/retry' 5 4 import {PUBLIC_BSKY_SERVICE} from '#/lib/constants' ··· 32 31 } 33 32 const gates = tryFetchGates(storedAccount.did, 'prefer-low-latency') 34 33 const moderation = configureModerationForAccount(agent, storedAccount) 35 - const prevSession = { 34 + const prevSession: AtpSessionData = { 35 + // Sorted in the same property order as when returned by BskyAgent (alphabetical). 36 36 accessJwt: storedAccount.accessJwt ?? '', 37 - refreshJwt: storedAccount.refreshJwt ?? '', 38 37 did: storedAccount.did, 38 + email: storedAccount.email, 39 + emailAuthFactor: storedAccount.emailAuthFactor, 40 + emailConfirmed: storedAccount.emailConfirmed, 39 41 handle: storedAccount.handle, 42 + refreshJwt: storedAccount.refreshJwt ?? '', 40 43 } 41 44 if (isSessionExpired(storedAccount)) { 42 45 await networkRetry(1, () => agent.resumeSession(prevSession))