Skip to content

Commit dd13cda

Browse files
feat(calm-ui): retire use of odic-client package (#2294)
* feat(calm-ui): retire use of odic-client package * feat(package-lock): after npm build to fix calm docify test failure
1 parent dc819f8 commit dd13cda

5 files changed

Lines changed: 1162 additions & 1448 deletions

File tree

calm-hub-ui/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Outputs an optimized production bundle to the `build` folder.
9999
| Visualization | ReactFlow, Dagre, D3 |
100100
| Styling | TailwindCSS, DaisyUI |
101101
| Code Display | Monaco Editor, react-json-view-lite |
102-
| Auth | OpenID Connect (oidc-client) |
102+
| Auth | OpenID Connect (oidc-client-ts) |
103103
| Testing | Vitest, Cypress |
104104
| Build | Vite |
105105

calm-hub-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"d3-transition": "^3.0.1",
2828
"d3-zoom": "^3.0.0",
2929
"lucide-react": "^0.577.0",
30-
"oidc-client": "^1.11.5",
30+
"oidc-client-ts": "3.5.0",
3131
"react": "^19.1.0",
3232
"react-dom": "^19.1.0",
3333
"react-dropzone": "^14.3.8",
@@ -99,4 +99,4 @@
9999
"last 1 safari version"
100100
]
101101
}
102-
}
102+
}

calm-hub-ui/src/ProtectedRoute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { ReactNode, useEffect, useState } from 'react';
2-
import { User } from 'oidc-client';
2+
import { User } from 'oidc-client-ts';
33
import { authService } from './authService.js';
44

55
interface ProtectedRouteProps {

calm-hub-ui/src/authService.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UserManager, Log, User } from 'oidc-client';
1+
import { UserManager, Log, User } from 'oidc-client-ts';
22
import axios from 'axios';
33

44
const config = {
@@ -28,8 +28,8 @@ export function isAuthServiceEnabled(): boolean {
2828

2929
if (isAuthServiceEnabled()) {
3030
userManager = new UserManager(config);
31-
Log.logger = console;
32-
Log.level = Log.INFO;
31+
Log.setLogger(console);
32+
Log.setLevel(Log.INFO);
3333
}
3434

3535
export async function getUser(): Promise<User | null> {

0 commit comments

Comments
 (0)