mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-11 13:35:13 +10:00
fix no name returned in github
This commit is contained in:
+3
-3
@@ -82,7 +82,7 @@
|
||||
"input-otp": "^1.4.2",
|
||||
"js-cookie": "^3.0.5",
|
||||
"monaco-editor": "^0.55.1",
|
||||
"motion": "^12.29.2",
|
||||
"motion": "^12.29.3",
|
||||
"nodemailer": "^7.0.13",
|
||||
"pg": "^8.18.0",
|
||||
"puppeteer-core": "^24.36.1",
|
||||
@@ -96,7 +96,7 @@
|
||||
"react-window": "^2.2.6",
|
||||
"react-zoom-pan-pinch": "^3.7.0",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"shadcn": "^3.8.1",
|
||||
"shadcn": "^3.8.2",
|
||||
"sharp": "^0.34.5",
|
||||
"sonner": "^2.0.7",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
@@ -125,7 +125,7 @@
|
||||
"@types/pg": "^8.16.0",
|
||||
"@types/react": "^19.2.10",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^5.1.2",
|
||||
"@vitejs/plugin-react": "^5.1.3",
|
||||
"babel-plugin-macros": "^3.1.0",
|
||||
"drizzle-kit": "^1.0.0-beta.12-a5629fb",
|
||||
"knip": "^5.82.1",
|
||||
|
||||
Generated
+380
-256
File diff suppressed because it is too large
Load Diff
@@ -143,8 +143,10 @@ const getAuthConfig = () => {
|
||||
// biome-ignore lint/style/noNonNullAssertion: enabled check ensures these are not null
|
||||
clientSecret: env.GOOGLE_CLIENT_SECRET!,
|
||||
mapProfileToUser: async (profile) => {
|
||||
const name = profile.name ?? profile.email.split("@")[0];
|
||||
|
||||
return {
|
||||
name: profile.name,
|
||||
name,
|
||||
email: profile.email,
|
||||
image: profile.picture,
|
||||
username: profile.email.split("@")[0],
|
||||
@@ -162,8 +164,10 @@ const getAuthConfig = () => {
|
||||
// biome-ignore lint/style/noNonNullAssertion: enabled check ensures these are not null
|
||||
clientSecret: env.GITHUB_CLIENT_SECRET!,
|
||||
mapProfileToUser: async (profile) => {
|
||||
const name = profile.name ?? profile.login ?? String(profile.id);
|
||||
const login = profile.login ?? String(profile.id);
|
||||
const normalizedLogin = toUsername(login);
|
||||
|
||||
const [legacyAccount] = await db
|
||||
.select({
|
||||
accountId: schema.account.accountId,
|
||||
@@ -185,7 +189,7 @@ const getAuthConfig = () => {
|
||||
if (legacyAccount) {
|
||||
return {
|
||||
id: legacyAccount.accountId,
|
||||
name: profile.name,
|
||||
name,
|
||||
email: legacyAccount.email,
|
||||
image: profile.avatar_url,
|
||||
username: legacyAccount.username,
|
||||
@@ -195,7 +199,7 @@ const getAuthConfig = () => {
|
||||
}
|
||||
|
||||
return {
|
||||
name: profile.name,
|
||||
name,
|
||||
email: profile.email,
|
||||
image: profile.avatar_url,
|
||||
username: normalizedLogin,
|
||||
|
||||
Reference in New Issue
Block a user