Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Clear session when auth fails

+8 -1
+8 -1
src/state/index.ts
··· 18 18 19 19 libapi.doPolyfill() 20 20 21 - const api = AtpApi.service(DEFAULT_SERVICE) 21 + const api = AtpApi.service(DEFAULT_SERVICE) as SessionServiceClient 22 22 rootStore = new RootStoreModel(api) 23 23 try { 24 24 data = (await storage.load(ROOT_STATE_STORAGE_KEY)) || {} ··· 28 28 } 29 29 30 30 await rootStore.session.setup() 31 + // @ts-ignore .on() is correct -prf 32 + api.sessionManager.on('session', () => { 33 + if (!api.sessionManager.session && rootStore.session.isAuthed) { 34 + // reset session 35 + rootStore.session.clear() 36 + } 37 + }) 31 38 32 39 // track changes & save to storage 33 40 autorun(() => {