1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-30 07:26:00 -04:00

fix oauth scopes

This commit is contained in:
2025-05-14 22:20:03 -04:00
parent e67f480980
commit 360d0fda1b

View File

@@ -16,16 +16,12 @@ export const auth = betterAuth({
github: { github: {
clientId: env.AUTH_GITHUB_CLIENT_ID, clientId: env.AUTH_GITHUB_CLIENT_ID,
clientSecret: env.AUTH_GITHUB_CLIENT_SECRET, clientSecret: env.AUTH_GITHUB_CLIENT_SECRET,
scope: ["read:user"], mapProfileToUser: (profile) => ({
disableDefaultScope: true, name: profile.login,
mapProfileToUser(profile) { email: profile.email,
return { emailVerified: true,
name: profile.login, image: profile.avatar_url,
email: profile.email, }),
emailVerified: true,
image: profile.avatar_url,
};
},
}, },
}, },
} satisfies BetterAuthOptions); } satisfies BetterAuthOptions);