Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix(frontend): Always return user is authed if mode is oss (#4733)

sp.wackf0af90bff3aa
diff --git a/frontend/src/routes/_oh.tsx b/frontend/src/routes/_oh.tsx
index af840ddc9b..da68e4f7aa 100644
--- a/frontend/src/routes/_oh.tsx
+++ b/frontend/src/routes/_oh.tsx
@@ -55,7 +55,7 @@ export const clientLoader = async ({ request }: ClientLoaderFunctionArgs) => {
posthog.opt_in_capturing();
}
- let isAuthed: boolean = false;
+ let isAuthed = false;
let githubAuthUrl: string | null = null;
try {
diff --git a/frontend/src/utils/user-is-authenticated.ts b/frontend/src/utils/user-is-authenticated.ts
index 137b866ad5..360b9041cf 100644
--- a/frontend/src/utils/user-is-authenticated.ts
+++ b/frontend/src/utils/user-is-authenticated.ts
@@ -1,6 +1,8 @@
import OpenHands from "#/api/open-hands";
export const userIsAuthenticated = async () => {
+ if (window.__APP_MODE__ === "oss") return true;
+
try {
await OpenHands.authenticate();
return true;