Skip to content

Commit

Permalink
Fix for sso access key reading (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui authored Nov 18, 2024
1 parent 006b013 commit faf2788
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions backend/controllers/shared/RTLConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Database } from '../../utils/database.js';
import { Logger } from '../../utils/logger.js';
import { Common } from '../../utils/common.js';
import { WSServer } from '../../utils/webSocketServer.js';
import { Authentication, SSO } from '../../models/config.model.js';
import { Authentication } from '../../models/config.model.js';
const options = { url: '' };
const logger = Logger;
const common = Common;
Expand Down Expand Up @@ -114,7 +114,9 @@ export const getApplicationSettings = (req, res, next) => {
if (err) {
// Delete unnecessary data for initial response (without security token)
const selNodeIdx = appConfData.nodes.findIndex((node) => node.index === appConfData.selectedNodeIndex) || 0;
appConfData.SSO = new SSO();
delete appConfData.SSO.rtlCookiePath;
delete appConfData.SSO.cookieValue;
delete appConfData.SSO.logoutRedirectLink;
appConfData.secret2FA = '';
appConfData.dbDirectoryPath = '';
appConfData.nodes[selNodeIdx].authentication = new Authentication();
Expand Down
2 changes: 1 addition & 1 deletion frontend/index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/main.89468e89473d89c7.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion frontend/main.ca6488a35864127e.js

This file was deleted.

6 changes: 4 additions & 2 deletions server/controllers/shared/RTLConf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Database, DatabaseService } from '../../utils/database.js';
import { Logger, LoggerService } from '../../utils/logger.js';
import { Common, CommonService } from '../../utils/common.js';
import { WSServer } from '../../utils/webSocketServer.js';
import { Authentication, SSO } from '../../models/config.model.js';
import { Authentication } from '../../models/config.model.js';

const options = { url: '' };
const logger: LoggerService = Logger;
Expand Down Expand Up @@ -116,7 +116,9 @@ export const getApplicationSettings = (req, res, next) => {
if (err) {
// Delete unnecessary data for initial response (without security token)
const selNodeIdx = appConfData.nodes.findIndex((node) => node.index === appConfData.selectedNodeIndex) || 0;
appConfData.SSO = new SSO();
delete appConfData.SSO.rtlCookiePath;
delete appConfData.SSO.cookieValue;
delete appConfData.SSO.logoutRedirectLink;
appConfData.secret2FA = '';
appConfData.dbDirectoryPath = '';
appConfData.nodes[selNodeIdx].authentication = new Authentication();
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
}
this.actions.pipe(
takeUntil(this.unSubs[4]),
filter((action) => action.type === RTLActions.FETCH_APPLICATION_SETTINGS || action.type === RTLActions.LOGIN || action.type === RTLActions.LOGOUT)).
filter((action) => action.type === RTLActions.SET_APPLICATION_SETTINGS || action.type === RTLActions.LOGIN || action.type === RTLActions.LOGOUT)).
subscribe((action: (any)) => {
if (action.type === RTLActions.SET_APPLICATION_SETTINGS) {
if (!this.sessionService.getItem('token')) {
Expand Down

0 comments on commit faf2788

Please sign in to comment.