Get account for current session

Let's say I have access to a website with both an email account and a social account. How can I determine which type of account I'm currently logged in with? How could I store this information in the session?
2 Replies
Ping
Ping3mo ago
You can call the listAccounts method (docs)
const accounts = await authClient.listAccounts();
const accounts = await authClient.listAccounts();
User & Accounts | Better Auth
User and account management.
FreeSpirit777
FreeSpirit777OP3mo ago
Ok thank you!!

Did you find this page helpful?