Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.app
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
VITE_APP_VERSION = $npm_package_version
VITE_APP_API_URL = https://neu.aula.de
VITE_APP_MULTI = true
VITE_APP_IS_SSO_ENABLED = false
VITE_APP_BASENAME = /

# vim: set ft=sh:
1 change: 0 additions & 1 deletion .env.docker
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
DOCKER_AULA_CENTRAL_API_URL="http://localhost:8080"
DOCKER_AULA_IS_MULTI=false
DOCKER_AULA_BASENAME="/"
DOCKER_AULA_IS_SSO_ENABLED=false

# vim: set ft=sh:
1 change: 0 additions & 1 deletion public/public-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"CENTRAL_API_URL": DOCKER_AULA_CENTRAL_API_URL,
"IS_MULTI": DOCKER_AULA_IS_MULTI,
"IS_SSO_ENABLED": DOCKER_AULA_IS_SSO_ENABLED,
"BASENAME": DOCKER_AULA_BASENAME
}
4 changes: 0 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ export const APP_TITLE = 'aula';
export interface RuntimeConfig {
CENTRAL_API_URL: string;
IS_MULTI: boolean;
IS_SSO_ENABLED: boolean;
BASENAME: string;
}

const defaultConfig: RuntimeConfig = {
CENTRAL_API_URL: 'https://neu.aula.de/',
IS_MULTI: true,
IS_SSO_ENABLED: false,
BASENAME: '/',
};

Expand All @@ -24,8 +22,6 @@ export async function loadRuntimeConfig(): Promise<RuntimeConfig> {
config = {
CENTRAL_API_URL: import.meta.env.VITE_APP_API_URL,
IS_MULTI: import.meta.env.VITE_APP_MULTI !== 'false' && import.meta.env.VITE_APP_MULTI !== false,
IS_SSO_ENABLED:
import.meta.env.VITE_APP_IS_SSO_ENABLED !== 'false' && import.meta.env.VITE_APP_IS_SSO_ENABLED !== false,
BASENAME: import.meta.env.VITE_APP_BASENAME || '/',
};
} else {
Expand Down
6 changes: 2 additions & 4 deletions src/views/Public/Login/LoginView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { AppIconButton, AppLink } from "@/components";
import Eduplaces from "@/components/Buttons/Eduplaces/Eduplaces";
import { getRuntimeConfig } from "@/config";
import { handleOAuthLogin } from "@/services/auth";
import { declineAccountClaim } from "@/services/idpMigration";
import { loginUser } from "@/services/login";
Expand Down Expand Up @@ -57,13 +56,12 @@ const LoginView = () => {
const [instanceSso, setInstanceSso] = useState<boolean | null | undefined>(undefined);
const [ssoRequired, setSsoRequired] = useState<boolean>(false);

const ssoAvailable = getRuntimeConfig().IS_SSO_ENABLED && instanceSso === true;
const ssoAvailable = instanceSso === true;
const ssoEnforced = ssoAvailable && ssoRequired;
const showPasswordLogin = !ssoEnforced || ssoLinkToken !== null;
const ssoBrowserSupported = useMemo(() => isSsoBrowserSupported(), []);

const ssoStatusPending =
getRuntimeConfig().IS_SSO_ENABLED && instanceSso === undefined && ssoLinkToken === null;
const ssoStatusPending = instanceSso === undefined && ssoLinkToken === null;

const schema = yup
.object({
Expand Down