Phase 2 + 3 complete

This commit is contained in:
Joey Yakimowich-Payne 2026-01-13 15:20:46 -07:00
commit 6d24f3c112
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
25 changed files with 3275 additions and 98 deletions

20
src/config/oidc.ts Normal file
View file

@ -0,0 +1,20 @@
import { WebStorageStateStore } from 'oidc-client-ts';
const AUTHENTIK_URL = import.meta.env.VITE_AUTHENTIK_URL || 'http://localhost:9000';
const CLIENT_ID = import.meta.env.VITE_OIDC_CLIENT_ID || 'kaboot-spa';
const APP_SLUG = import.meta.env.VITE_OIDC_APP_SLUG || 'kaboot';
export const oidcConfig = {
authority: `${AUTHENTIK_URL}/application/o/${APP_SLUG}/`,
client_id: CLIENT_ID,
redirect_uri: `${window.location.origin}/callback`,
post_logout_redirect_uri: window.location.origin,
response_type: 'code',
scope: 'openid profile email offline_access',
automaticSilentRenew: true,
loadUserInfo: true,
userStore: new WebStorageStateStore({ store: window.localStorage }),
onSigninCallback: () => {
window.history.replaceState({}, document.title, window.location.pathname);
},
};