mikeysee
mikeysee5mo ago

Convex auth seems to sign me out every 24-28 hours, why?

I cant for the life of me work it out. This is my auth setup:
import { convexAuth } from "@convex-dev/auth/server";
import { Password } from "@convex-dev/auth/providers/Password";

export const { auth, signIn, signOut, store } = convexAuth({
providers: [Password],
});
import { convexAuth } from "@convex-dev/auth/server";
import { Password } from "@convex-dev/auth/providers/Password";

export const { auth, signIn, signOut, store } = convexAuth({
providers: [Password],
});
So im not doing anything special there.. the docs say the session length should default to 30 days not 1-2 days. Im using the Authenticated, AuthLoading, Unauthenticated from "convex/react" The project is using Vite. My convex provider looks like:
import { ConvexReactClient } from "convex/react";
import { ReactNode, useMemo } from "react";
import { ConvexAuthProvider } from "@convex-dev/auth/react";
import { ConvexQueryCacheProvider } from "convex-helpers/react/cache/provider";

export function ConvexClientProvider({ children, url }: { children: ReactNode; url: string }) {
const client = useMemo(() => {
console.log(`Creating ConvexReactClient with url: ${url}`);
return new ConvexReactClient(url);
}, [url]);

return (
<ConvexAuthProvider client={client}>
<ConvexQueryCacheProvider>{children}</ConvexQueryCacheProvider>
</ConvexAuthProvider>
);
}
import { ConvexReactClient } from "convex/react";
import { ReactNode, useMemo } from "react";
import { ConvexAuthProvider } from "@convex-dev/auth/react";
import { ConvexQueryCacheProvider } from "convex-helpers/react/cache/provider";

export function ConvexClientProvider({ children, url }: { children: ReactNode; url: string }) {
const client = useMemo(() => {
console.log(`Creating ConvexReactClient with url: ${url}`);
return new ConvexReactClient(url);
}, [url]);

return (
<ConvexAuthProvider client={client}>
<ConvexQueryCacheProvider>{children}</ConvexQueryCacheProvider>
</ConvexAuthProvider>
);
}
The versions I am using are:
"convex": "^1.14.4",
"@convex-dev/auth": "^0.0.61",
"convex": "^1.14.4",
"@convex-dev/auth": "^0.0.61",
Im on windows 11 running chrome if that helps
1 Reply
ballingt
ballingt4mo ago
What do these cookies look like?