diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f908172df..e8180357e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,7 +9,8 @@ "ghcr.io/devcontainers-contrib/features/pnpm:2": { "version": "9" }, - "ghcr.io/devcontainers/features/git:1": {} + "ghcr.io/devcontainers/features/git:1": {}, + "github-cli": "latest" }, "hostRequirements": { "cpus": 2, @@ -31,8 +32,9 @@ 8180, 8181, 8182, 8183, 8184, 8185, 8186, 8187, 8188, 8189, 8190, 8191, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199 ], - "postCreateCommand": "pnpm install && pnpm build:packages && pnpm codegen && pnpm run start-deps && pnpm run stop-deps", - "postStartCommand": "pnpm install && clear && echo 'To start the development server with dependencies, run: pnpm restart-deps && pnpm dev' && echo 'To run the tests, run: pnpm test []'", + "postCreateCommand": "chmod +x .devcontainer/set-env.sh && pnpm install && pnpm build:packages && pnpm codegen && pnpm run start-deps && pnpm run stop-deps", + "postStartCommand": "pnpm install && clear", + "postAttachCommand": ". .devcontainer/set-env.sh", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/set-env.sh b/.devcontainer/set-env.sh new file mode 100755 index 000000000..8b226c169 --- /dev/null +++ b/.devcontainer/set-env.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -n "$CODESPACE_NAME" ]; then + export NEXT_PUBLIC_STACK_API_URL="https://${CODESPACE_NAME}-8102.app.github.dev" + export STACK_MOCK_OAUTH_REDIRECT_URIS="https://${CODESPACE_NAME}-8102.app.github.dev/api/v1/auth/oauth/callback/{id}" + export NEXT_PUBLIC_STACK_DASHBOARD_URL="https://${CODESPACE_NAME}-8101.app.github.dev" + gh codespace ports visibility 8102:public -c $CODESPACE_NAME && gh codespace ports visibility 8114:public -c $CODESPACE_NAME +fi + +echo 'To start the development server with dependencies, run: pnpm restart-deps && pnpm dev' diff --git a/.vscode/settings.json b/.vscode/settings.json index d1137aca8..a0bbee998 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,7 @@ "backlinks", "Cancelation", "Cdfc", + "checksummable", "chinthakagodawita", "cjsx", "clsx", diff --git a/apps/backend/src/lib/tokens.tsx b/apps/backend/src/lib/tokens.tsx index 8e793182e..6232dc930 100644 --- a/apps/backend/src/lib/tokens.tsx +++ b/apps/backend/src/lib/tokens.tsx @@ -103,6 +103,7 @@ export async function generateAccessToken(options: { sub: options.userId, branchId: options.tenancy.branchId, refreshTokenId: options.refreshTokenId, + role: 'authenticated', }, expirationTime: getEnvVariable("STACK_ACCESS_TOKEN_EXPIRATION_TIME", "10min"), }); diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 4fee7da84..349c6745e 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -36,7 +36,7 @@ "lucide-react": "^0.378.0", "next": "15.2.3", "next-themes": "^0.2.1", - "posthog-js": "^1.149.1", + "posthog-js": "^1.234.9", "react": "19.0.0", "react-dom": "19.0.0", "react-globe.gl": "^2.28.2", diff --git a/apps/dashboard/src/app/(main)/wizard-congrats/page.tsx b/apps/dashboard/src/app/(main)/wizard-congrats/page.tsx index 5bfb75fd9..ea2b7ed9e 100644 --- a/apps/dashboard/src/app/(main)/wizard-congrats/page.tsx +++ b/apps/dashboard/src/app/(main)/wizard-congrats/page.tsx @@ -1,6 +1,7 @@ import { Confetti } from "@/components/confetti"; import { Card, CardContent, CardFooter, CardHeader, InlineCode, Typography } from "@stackframe/stack-ui"; import Actions from "./actions"; +import PostHog from "./posthog"; export const metadata = { title: "Setup complete!", @@ -9,6 +10,7 @@ export const metadata = { export default function WizardCongratsPage() { return ( <> +