+1
-3
src/lib/states/session.tsx
+1
-3
src/lib/states/session.tsx
···
172
172
const expiresAt = session.token.expires_at;
173
173
174
174
agent = new OAuthUserAgent(session);
175
-
handler = (pathname, init) => {
176
-
return agent!.handle(pathname, { ...init, keepalive: false });
177
-
};
175
+
handler = agent;
178
176
179
177
if (expiresAt !== undefined && expiresAt - Date.now() <= 5 * 60 * 1000) {
180
178
agent.getSession({ noCache: true });
+1
-5
src/views/oauth-callback.tsx
+1
-5
src/views/oauth-callback.tsx
···
27
27
const did = session.info.sub;
28
28
29
29
const agent = new OAuthUserAgent(session);
30
-
const client = new Client({
31
-
handler(pathname, init) {
32
-
return agent!.handle(pathname, { ...init, keepalive: false });
33
-
},
34
-
});
30
+
const client = new Client({ handler: agent });
35
31
36
32
const profile = await ok(
37
33
client.get('app.bsky.actor.getProfile', {