wrongmove/crawler/frontend/src/auth/config.ts
Viktor Barzin 2626870396
Use localhost as dev origin instead of devvm.viktorbarzin.lan
DEV_HOST env var now controls the hostname, defaulting to localhost.
This makes the dev setup work on any machine without requiring a
specific DNS entry.
2026-02-06 23:44:50 +00:00

13 lines
663 B
TypeScript

import { WebStorageStateStore } from "oidc-client-ts";
export const oidcConfig = {
authority: "https://authentik.viktorbarzin.me/application/o/wrongmove/",
client_id: "5AJKRgcdgVm1OyApBzFkadDFfStW9a555zwv2MOe",
redirect_uri: import.meta.env.MODE === 'development' ? "https://localhost/callback" : "https://wrongmove.viktorbarzin.me/callback",
userStore: new WebStorageStateStore({ store: window.localStorage }),
response_type: 'code', // PKCE flow (recommended for SPAs)
scope: 'openid profile email', // Requested scopes
automaticSilentRenew: true, // Renew tokens silently
filterProtocolClaims: true,
loadUserInfo: true,
};