Skip to content

Commit

Permalink
Add more logic to authenticate the user before launching the appDef
Browse files Browse the repository at this point in the history
  • Loading branch information
iyannsch committed Oct 29, 2024
1 parent 97e6c64 commit 988df42
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions node/landing-page/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,19 @@ function App(): JSX.Element {
console.log('Artemis Token: ' + artemisToken);
console.log('-----------------------------------');

if (config.useKeycloak && !token) {
console.log('Keycloak is enabled but no token is present');
authenticate();
return;
}

if (!initialized) {
console.log('Not initialized yet');
return;
}

if (selectedAppDefinition && gitUri) {
console.log('Checking auth, setting autoStart to true and starting session');
authenticate();
console.log('Setting autoStart to true and starting session');
setAutoStart(true);
handleStartSession(selectedAppDefinition);
} else {
Expand Down

0 comments on commit 988df42

Please sign in to comment.