Perform OpenID authentication

This commit is contained in:
2024-05-02 22:14:20 +02:00
parent 46648db093
commit b6e15d2cbb
3 changed files with 82 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import { ServerApi } from "./api/ServerApi";
import { AuthRouteWidget } from "./routes/AuthRouteWidget";
import { AsyncWidget } from "./widgets/AsyncWidget";
export function App() {
@ -8,7 +9,13 @@ export function App() {
errMsg="Failed to load server configuration!"
load={ServerApi.LoadConfig}
loadingMessage="Loading server configuration..."
build={() => <>todo</>}
build={() => <AppInner />}
/>
);
}
function AppInner(): React.ReactElement {
if (!ServerApi.Config.authenticated && !ServerApi.Config.disable_auth)
return <AuthRouteWidget />;
return <>todo authenticated</>;
}