mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-05 08:06:19 +00:00
Merge remote-tracking branch 'origin/main' into vorflux/eval-data-generator
This commit is contained in:
commit
317b0260f0
2 changed files with 18 additions and 13 deletions
|
|
@ -204,18 +204,12 @@ export default function LoginPage() {
|
|||
email_domain: email.split("@")[1] || "unknown",
|
||||
})
|
||||
|
||||
try {
|
||||
await signIn.magicLink({
|
||||
callbackURL: getCallbackURL(),
|
||||
email,
|
||||
})
|
||||
setSubmittedEmail(email)
|
||||
setPendingLoginMethod("magic_link")
|
||||
// Track successful magic link send
|
||||
posthog.capture("login_magic_link_sent", {
|
||||
email_domain: email.split("@")[1] || "unknown",
|
||||
})
|
||||
} catch (error) {
|
||||
const { error } = await signIn.magicLink({
|
||||
callbackURL: getCallbackURL(),
|
||||
email,
|
||||
})
|
||||
|
||||
if (error) {
|
||||
console.error(error)
|
||||
|
||||
// Track login failure
|
||||
|
|
@ -232,6 +226,12 @@ export default function LoginPage() {
|
|||
return
|
||||
}
|
||||
|
||||
setSubmittedEmail(email)
|
||||
setPendingLoginMethod("magic_link")
|
||||
posthog.capture("login_magic_link_sent", {
|
||||
email_domain: email.split("@")[1] || "unknown",
|
||||
})
|
||||
|
||||
setIsLoading(false)
|
||||
setIsLoadingEmail(false)
|
||||
}
|
||||
|
|
@ -355,6 +355,9 @@ export default function LoginPage() {
|
|||
callbackURL: getCallbackURL(),
|
||||
provider: "google",
|
||||
})
|
||||
.catch((err: unknown) => {
|
||||
setError(getErrorMessage(err))
|
||||
})
|
||||
.finally(() => {
|
||||
setIsLoading(false)
|
||||
})
|
||||
|
|
@ -419,6 +422,9 @@ export default function LoginPage() {
|
|||
callbackURL: getCallbackURL(),
|
||||
provider: "github",
|
||||
})
|
||||
.catch((err: unknown) => {
|
||||
setError(getErrorMessage(err))
|
||||
})
|
||||
.finally(() => {
|
||||
setIsLoading(false)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ export const authClient = createAuthClient({
|
|||
baseURL: process.env.NEXT_PUBLIC_BACKEND_URL ?? "https://api.supermemory.ai",
|
||||
fetchOptions: {
|
||||
credentials: "include",
|
||||
throw: true,
|
||||
},
|
||||
plugins: [
|
||||
usernameClient(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue