diff --git a/apps/web/.env.example b/apps/web/.env.example index aaf5fab4e..abd39cef9 100644 --- a/apps/web/.env.example +++ b/apps/web/.env.example @@ -1,4 +1,5 @@ NEXT_PUBLIC_BACKEND_URL=https://api.supermemory.ai NEXT_PUBLIC_POSTHOG_KEY= EXA_API_KEY= -XAI_API_KEY= \ No newline at end of file +XAI_API_KEY= +NEXT_PUBLIC_AGENTID_AUTH_ENABLED= diff --git a/apps/web/app/(auth)/login/page.tsx b/apps/web/app/(auth)/login/page.tsx index 8500a2365..442ded03f 100644 --- a/apps/web/app/(auth)/login/page.tsx +++ b/apps/web/app/(auth)/login/page.tsx @@ -591,6 +591,79 @@ export default function LoginPage() { /> ) : null} + {process.env.NEXT_PUBLIC_HOST_ID === "supermemory" || + process.env.NEXT_PUBLIC_AGENTID_AUTH_ENABLED ? ( +
+ + + AgentID + + + + + + + } + authProvider="AgentID" + className="w-full" + disabled={Boolean(loadingMessage)} + onClick={() => { + if (loadingMessage) return + setIsLoading(true) + posthog.capture("login_attempt", { + method: "social", + provider: "agentid", + }) + setPendingLoginMethod("agentid") + signIn + .oauth2({ + callbackURL: getCallbackURL(), + providerId: "agentid", + }) + .catch((err: unknown) => { + setError(getErrorMessage(err)) + setIsLoading(false) + }) + }} + /> +
+ ) : null}