Phase 2 + 3 complete
This commit is contained in:
parent
9a3fc97a34
commit
6d24f3c112
25 changed files with 3275 additions and 98 deletions
20
src/config/oidc.ts
Normal file
20
src/config/oidc.ts
Normal 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);
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue