check-sso

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-02-15 18:40:06 +03:00
parent a401290920
commit 4b252259eb

View File

@ -10,7 +10,7 @@ const start = async () => {
// onLoad: 'check-sso', // onLoad: 'check-sso',
// silentCheckSsoRedirectUri: `${location.origin}/silent-check-sso.html` // silentCheckSsoRedirectUri: `${location.origin}/silent-check-sso.html`
try { try {
const authenticated = await keycloak.init({ onLoad: 'login-required' }); const authenticated = await keycloak.init({ onLoad: 'check-sso' }) // 'login-required' });
console.log(`User is ${authenticated ? 'authenticated' : 'not authenticated'}`); console.log(`User is ${authenticated ? 'authenticated' : 'not authenticated'}`);
} catch (error) { } catch (error) {
console.error('Failed to initialize adapter:', error); console.error('Failed to initialize adapter:', error);