other realm

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-02-14 13:43:46 +03:00
parent 4b1c9f86f0
commit f7a8c9e077
2 changed files with 3 additions and 3 deletions

View File

@ -2,6 +2,6 @@ import Keycloak from 'keycloak-js';
export const keycloak = new Keycloak({ export const keycloak = new Keycloak({
url: 'https://kc.inno-js.ru', url: 'https://kc.inno-js.ru',
realm: 'test', realm: 'inno-js',
clientId: 'jurnal' clientId: 'jurnal'
}); });

View File

@ -6,9 +6,9 @@ import { keycloak } from './__data__/const';
export default () => <App/>; export default () => <App/>;
const start = async () => { const start = async () => {
// onLoad: 'check-sso',
// silentCheckSsoRedirectUri: `${location.origin}/silent-check-sso.html`
try { try {
const authenticated = await keycloak.init({ onLoad: 'login-required' }); const authenticated = await keycloak.init({ onLoad: 'login-required' });
console.log(`User is ${authenticated ? 'authenticated' : 'not authenticated'}`); console.log(`User is ${authenticated ? 'authenticated' : 'not authenticated'}`);