fix: remove senstive fields on list accounts from being exposed to the client

This commit is contained in:
Bereket Engida
2024-11-07 16:08:07 +03:00
parent 2ba2bec1f1
commit f09e2879d6

View File

@@ -16,7 +16,14 @@ export const listUserAccounts = createAuthEndpoint(
const accounts = await c.context.internalAdapter.findAccounts(
session.user.id,
);
return c.json(accounts);
return c.json(
accounts.map((a) => {
return {
id: a.id,
provider: a.providerId,
};
}),
);
},
);