Route app auth through workspace client

This commit is contained in:
2026-07-15 16:21:19 -05:00
parent 60508cbe46
commit 4508d956dc
3 changed files with 6 additions and 5 deletions
+4 -4
View File
@@ -14,7 +14,7 @@ import {
import {
createSession,
defaultTranslationId,
hostedWorkspaceEnabled,
getAuthClient,
loadHostedSession,
loadWorkspaceSnapshot,
loginHostedWorkspace,
@@ -461,7 +461,7 @@ function App() {
setAuthRequired(false)
workspaceHydrated.current = false
if (hostedWorkspaceEnabled()) {
if (getAuthClient().enabled) {
const session = await loadHostedSession()
if (cancelled()) return
setHostedUser(session.user)
@@ -521,7 +521,7 @@ function App() {
studySettings: studySettingsSnapshot,
}).catch((reason) => {
console.warn(
hostedWorkspaceEnabled()
getAuthClient().enabled
? 'Unable to save hosted workspace.'
: 'Unable to save local workspace.',
reason,
@@ -2547,7 +2547,7 @@ function App() {
const splitTemplate = `${splitPercent}fr 6px ${100 - splitPercent}fr`
if (authRequired && hostedWorkspaceEnabled()) {
if (authRequired && getAuthClient().enabled) {
return renderHostedLogin()
}