A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix(web): Change names to be optional when signing up via SSO. #410 (#412)
kamtschatkae1feeceda475
diff --git a/apps/web/server/auth.ts b/apps/web/server/auth.tsindex 483d1522..042be1ae 100644--- a/apps/web/server/auth.ts+++ b/apps/web/server/auth.ts@@ -114,7 +114,7 @@ if (oauth.wellKnownUrl) {]);return {id: profile.sub,- name: profile.name,+ name: profile.name || profile.email,email: profile.email,image: profile.picture,role: admin || firstUser ? "admin" : "user",@@ -146,7 +146,7 @@ export const authOptions: NextAuthOptions = {if (credentials) {return true;}- if (!profile?.email || !profile?.name) {+ if (!profile?.email) {throw new Error("No profile");}const [{ count: userCount }] = await db