From a44f133fa9b7448d5192d8e297bd8b4da28decf1 Mon Sep 17 00:00:00 2001 From: Emanuel Almeida Date: Mon, 1 Jan 2001 00:00:00 +0000 Subject: [PATCH] feat: add OIDC config for Authentik --- src/auth/config.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/auth/config.ts diff --git a/src/auth/config.ts b/src/auth/config.ts new file mode 100644 index 0000000..f05b667 --- /dev/null +++ b/src/auth/config.ts @@ -0,0 +1,13 @@ +import { WebStorageStateStore } from 'oidc-client-ts'; + +export const oidcConfig = { + authority: 'https://auth.descomplicar.pt/application/o/dashboard-descomplicar/', + client_id: 'OKRSM2FZeSxJDhoV9e17dGRU1L1NEE1JBdnPVWTO', + redirect_uri: window.location.origin + '/callback', + post_logout_redirect_uri: window.location.origin, + scope: 'openid profile email', + userStore: new WebStorageStateStore({ store: window.localStorage }), + onSigninCallback: () => { + window.history.replaceState({}, document.title, window.location.pathname); + }, +};