Skip to content

Commit 91c267d

Browse files
committed
Set daydream userID based on auth callback
1 parent e4d2253 commit 91c267d

13 files changed

Lines changed: 110 additions & 292 deletions

File tree

FAL_DEPLOYMENT.md

Lines changed: 0 additions & 188 deletions
This file was deleted.

frontend/package-lock.json

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/components/settings/DaydreamAccountSection.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import { Cloud, Loader2, X, Copy, Check } from "lucide-react";
1414
import {
1515
isAuthenticated,
1616
redirectToSignIn,
17-
clearDaydreamAPIKey,
17+
clearDaydreamAuth,
18+
getDaydreamUserId,
1819
} from "../../lib/auth";
1920

2021
interface CloudStatus {
@@ -118,7 +119,7 @@ export function DaydreamAccountSection({
118119
abortControllerRef.current = abortController;
119120

120121
try {
121-
const userId = "TODO";
122+
const userId = getDaydreamUserId();
122123

123124
const response = await fetch("/api/v1/cloud/connect", {
124125
method: "POST",
@@ -224,7 +225,7 @@ export function DaydreamAccountSection({
224225
if (status.connected) {
225226
handleDisconnect();
226227
}
227-
clearDaydreamAPIKey();
228+
clearDaydreamAuth();
228229
setIsSignedIn(false);
229230
};
230231

0 commit comments

Comments
 (0)