Skip to content

Commit

Permalink
fix: Remove RefreshBootstrap and refresh token handling (#2257)
Browse files Browse the repository at this point in the history
- This never worked and doesn't get used anyway, since we attempt
re-login with the pre-shared key if provided
- Tested by logging into a server with a pre-shared key, then hitting
Refresh and ensuring it logged in again without being prompted
  • Loading branch information
mofojed authored Oct 23, 2024
1 parent 9d84d8d commit 5686032
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 128 deletions.
1 change: 0 additions & 1 deletion packages/app-utils/src/components/AppBootstrap.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const mockChannel = {
};
jest.mock('@deephaven/jsapi-components', () => ({
...jest.requireActual('@deephaven/jsapi-components'),
RefreshTokenBootstrap: jest.fn(({ children }) => children),
useBroadcastChannel: jest.fn(() => mockChannel),
useBroadcastLoginListener: jest.fn(),
}));
Expand Down
25 changes: 10 additions & 15 deletions packages/app-utils/src/components/AppBootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { Provider } from 'react-redux';
import { store } from '@deephaven/redux';
import '@deephaven/components/scss/BaseStyleSheet.scss';
import { ClientBootstrap } from '@deephaven/jsapi-bootstrap';
import {
RefreshTokenBootstrap,
useBroadcastLoginListener,
} from '@deephaven/jsapi-components';
import { useBroadcastLoginListener } from '@deephaven/jsapi-components';
import { type Plugin } from '@deephaven/plugin';
import FontBootstrap from './FontBootstrap';
import PluginsBootstrap from './PluginsBootstrap';
Expand Down Expand Up @@ -70,17 +67,15 @@ export function AppBootstrap({
options={clientOptions}
key={logoutCount}
>
<RefreshTokenBootstrap>
<AuthBootstrap>
<ServerConfigBootstrap>
<UserBootstrap>
<ConnectionBootstrap>
<FontsLoaded>{children}</FontsLoaded>
</ConnectionBootstrap>
</UserBootstrap>
</ServerConfigBootstrap>
</AuthBootstrap>
</RefreshTokenBootstrap>
<AuthBootstrap>
<ServerConfigBootstrap>
<UserBootstrap>
<ConnectionBootstrap>
<FontsLoaded>{children}</FontsLoaded>
</ConnectionBootstrap>
</UserBootstrap>
</ServerConfigBootstrap>
</AuthBootstrap>
</ClientBootstrap>
</ThemeBootstrap>
</PluginsBootstrap>
Expand Down
60 changes: 0 additions & 60 deletions packages/jsapi-components/src/RefreshTokenBootstrap.tsx

This file was deleted.

50 changes: 0 additions & 50 deletions packages/jsapi-components/src/RefreshTokenUtils.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/jsapi-components/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export * from './HookTestUtils';
export { default as TableInput } from './TableInput';
export * from './RefreshTokenBootstrap';
export * from './RefreshTokenUtils';
export * from './spectrum';
export * from './TableDropdown';
export { default as useBroadcastChannel } from './useBroadcastChannel';
Expand Down

0 comments on commit 5686032

Please sign in to comment.