mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-27 17:36:42 -05:00
fix: remove senstive fields on list accounts from being exposed to the client
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user