Kıte
Kıte
CCConvex Community
Created by Kıte on 8/30/2024 in #support-community
withOptimistic in fetchMutation
Is there a way to use withOptimistic in fetchMutation? I tried to usereact useOptimistic hooks with preloadQuery but
Preload<typeof api.dbquery>
Preload<typeof api.dbquery>
somehow _id and _createdTime is required in new obj.
12 replies
CCConvex Community
Created by Kıte on 8/14/2024 in #support-community
Convex Auth Google OAuth
Hello I've tried looking in the docs and can't find any relative to this problem. I'm trying to separate name and last name from Google Auth but when I do this code it doesn't let me login nor create new user. any idea for this?
export const { auth, signIn, signOut, store } = convexAuth({
providers: [
Google({
profile: (prof) => {
return {
...prof,
id: prof.id,
email: prof.email,
name: prof.give_name,
lastname: prof.last_name,
image: prof.picture
};
},
}),
],
});
export const { auth, signIn, signOut, store } = convexAuth({
providers: [
Google({
profile: (prof) => {
return {
...prof,
id: prof.id,
email: prof.email,
name: prof.give_name,
lastname: prof.last_name,
image: prof.picture
};
},
}),
],
});
this is my custom schema for user
users: defineTable({
email: v.optional(v.string()),
emailVerificationTime: v.optional(v.float64()),
image: v.optional(v.string()),
isAnonymous: v.optional(v.boolean()),
name: v.optional(v.string()),
lastname: v.optional(v.string()),
phone: v.optional(v.string()),
phoneVerificationTime: v.optional(v.float64()),
})
.index("email", ["email"])
.index("phone", ["phone"])
.searchIndex("search_by_email", {
searchField: "email",
})
.searchIndex("search_by_name", { searchField: "name" }),
users: defineTable({
email: v.optional(v.string()),
emailVerificationTime: v.optional(v.float64()),
image: v.optional(v.string()),
isAnonymous: v.optional(v.boolean()),
name: v.optional(v.string()),
lastname: v.optional(v.string()),
phone: v.optional(v.string()),
phoneVerificationTime: v.optional(v.float64()),
})
.index("email", ["email"])
.index("phone", ["phone"])
.searchIndex("search_by_email", {
searchField: "email",
})
.searchIndex("search_by_name", { searchField: "name" }),
41 replies
CCConvex Community
Created by Kıte on 11/20/2023 in #support-community
WebSocket Port
No description
28 replies