import { nanoid } from 'nanoid' /** * Api root path * @type {string} */ const API_ROOT = window.location.protocol + '//127.0.0.1:8000'; // ДЛЯ ПРОДА ПОСТАВИТЬ ЭТО: '//pairent.vvsu.ru' if (window.localStorage.getItem('oidc_client_key') == undefined) { window.localStorage.setItem('oidc_client_key', nanoid(32)); } const OIDC_CLIENT_KEY = window.localStorage.getItem('oidc_client_key'); /** OpenID Connect Client Config * @type {import('oidc-client-ts').OidcClientSettings} */ const OIDCConfig = { onSignIn: () => {}, authority: API_ROOT + '/api/auth/vvsu/', client_id: 'it-hub-client', redirect_uri: 'https://pairent.vvsu.ru/sign-in/', scope: [ 'openid', 'vvsu_IdUser', 'vvsu_IdEmpl', 'vvsu_IdStud', 'vvsu_login', 'given_name', 'family_name' ], client_secret: OIDC_CLIENT_KEY }; export default Object.freeze({ API_ROOT, OIDCConfig, OIDC_CLIENT_KEY });