resources

This commit is contained in:
2026-02-24 16:44:22 +00:00
parent d6ffe43a11
commit 05f0d0e8f7
39 changed files with 1385 additions and 1057 deletions
@@ -106,6 +106,7 @@ integrationsRouter.get('/google/status', async (ctx) => {
configured: !!(config?.clientId && config?.clientSecret),
connected: !!connection?.accessToken,
email: connection?.email ?? null,
picture: connection?.picture ?? null,
});
});
@@ -201,9 +202,11 @@ export const googleCallbackHandler = async (ctx: any) => {
});
let googleEmail = email;
let picture: string | null = null;
if (userinfoResponse.ok) {
const userinfo = await userinfoResponse.json();
googleEmail = userinfo.email ?? email;
picture = userinfo.picture ?? null;
}
await writeUserGoogle(email, {
@@ -211,6 +214,7 @@ export const googleCallbackHandler = async (ctx: any) => {
refreshToken: tokens.refresh_token,
expiresAt: Date.now() + tokens.expires_in * 1000,
email: googleEmail,
picture,
scope: tokens.scope,
});