Merge dev into update-oauth-docs

This commit is contained in:
Konsti Wohlwend 2025-11-05 03:32:14 -08:00 committed by GitHub
commit 21b284e6f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 29 additions and 2 deletions

View File

@ -12,9 +12,21 @@ import { useAdminApp } from "../use-admin-app";
function TotalUsersDisplay() {
const stackAdminApp = useAdminApp();
const data = (stackAdminApp as any)[stackAppInternalsSymbol].useMetrics();
const metrics = (stackAdminApp as any)[stackAppInternalsSymbol].useMetrics(false);
const metricsIncludingAnonymous = (stackAdminApp as any)[stackAppInternalsSymbol].useMetrics(true);
return <>{data.total_users}</>;
const anonymousUsersCount = metricsIncludingAnonymous.total_users - metrics.total_users;
return (
<>
{metrics.total_users}
{anonymousUsersCount > 0 ? (
<>
{" "}(+ {anonymousUsersCount} anonymous)
</>
) : null}
</>
);
}
export default function PageClient() {

View File

@ -28,6 +28,21 @@ export default {
}
```
Next, update or create a file in `convex/convex.config.ts`:
```ts
import { defineApp } from "convex/server";
import stackAuthComponent from "@stackframe/js/convex.config"; // Vanilla JS
// or: import stackAuthComponent from "@stackframe/react/convex.config"; // React
// or: import stackAuthComponent from "@stackframe/stack/convex.config"; // Next.js
const app = defineApp();
app.use(stackAuthComponent);
export default app;
```
Then, update your Convex client to use Stack Auth:
```ts