databaseHooks: {
// When signing up or signing in with OAuth, ensure the user's access
// and refresh tokens are encrypted when stored in the database.
account: {
create: {
before: async (account) => {
return encryptAccountData(account);
},
},
update: {
before: async (account, context) => {
console.log("update social acc", account, context);
return encryptAccountData(account);
},
},
},
},
databaseHooks: {
// When signing up or signing in with OAuth, ensure the user's access
// and refresh tokens are encrypted when stored in the database.
account: {
create: {
before: async (account) => {
return encryptAccountData(account);
},
},
update: {
before: async (account, context) => {
console.log("update social acc", account, context);
return encryptAccountData(account);
},
},
},
},