mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-24 16:11:53 -05:00
fix(social-providers/vk): check for empty email after profile mapping
This commit is contained in:
@@ -98,11 +98,11 @@ export const vk = (options: VkOption) => {
|
||||
if (error) {
|
||||
return null;
|
||||
}
|
||||
if (!profile.user.email) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const userMap = await options.mapProfileToUser?.(profile);
|
||||
if (!profile.user.email && !userMap?.email) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
user: {
|
||||
|
||||
Reference in New Issue
Block a user