rework login page, deduplicate code by using layouts

This commit is contained in:
maxDorninger
2025-08-02 14:18:18 +02:00
parent 2eaa1b94c0
commit 79ccfe701d
9 changed files with 476 additions and 469 deletions

View File

@@ -0,0 +1,16 @@
import type {LayoutLoad} from './$types';
import {env} from '$env/dynamic/public';
const apiUrl = env.PUBLIC_API_URL;
export const load: LayoutLoad = async ({fetch}) => {
const response = await fetch(apiUrl + '/auth/metadata', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
credentials: 'include'
});
return {oauthProvider: await response.json()};
};