Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3385134
D14031.id45985.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D14031.id45985.diff
View Options
diff --git a/lib/identity-search/identity-search-context.js b/lib/identity-search/identity-search-context.js
--- a/lib/identity-search/identity-search-context.js
+++ b/lib/identity-search/identity-search-context.js
@@ -4,6 +4,7 @@
import * as React from 'react';
import uuid from 'uuid';
+import { useInvalidCSATLogOut } from '../actions/user-actions.js';
import { identitySearchURL } from '../facts/identity-search.js';
import {
clientRequestVisualTimeout,
@@ -64,6 +65,7 @@
const [connected, setConnected] = React.useState(false);
const listeners = React.useRef<Set<IdentitySearchSocketListener>>(new Set());
const getIdentitySearchAuthMessage = useGetIdentitySearchAuthMessage();
+ const invalidTokenLogOut = useInvalidCSATLogOut();
const [identitySearchAuthMessage, setIdentitySearchAuthMessage] =
React.useState<?IdentitySearchAuthMessage>(null);
const socket = React.useRef<?WebSocket>(null);
@@ -170,6 +172,10 @@
'Success for already connected socket',
);
} else {
+ if (message.status.data?.includes('UnauthorizedDevice')) {
+ void invalidTokenLogOut();
+ return;
+ }
setConnected(false);
console.log(
'creating session with Identity Search error:',
@@ -207,6 +213,7 @@
identitySearchAuthMessage,
resetHeartbeatTimeout,
stopHeartbeatTimeout,
+ invalidTokenLogOut,
]);
const sendPrefixQuery: (
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 11:31 PM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597638
Default Alt Text
D14031.id45985.diff (1 KB)
Attached To
Mode
D14031: [lib] Handle invalid CSAT in Identity Search context
Attached
Detach File
Event Timeline
Log In to Comment