feat (PUT-1025 PUT-1026 and PUT-1017): better handling old token auth required in gui (#3166)

* feat (PUT-1025 PUT-1026 and PUT-1017): better handling old token forcing in gui

* fix: misc issues with token inval project
This commit is contained in:
Daniel Salazar
2026-05-27 02:26:35 -07:00
committed by GitHub
parent b188942436
commit 8f8efcb349
10 changed files with 1342 additions and 112 deletions
+12 -1
View File
@@ -315,7 +315,18 @@ export class SocketService extends PuterService {
}
try {
const result = await authService.authenticate(token);
const handshakeHeaders =
(socket.handshake.headers as
| Record<string, string | string[] | undefined>
| undefined) ?? {};
const uaHeader = handshakeHeaders['user-agent'];
const userAgent = Array.isArray(uaHeader)
? uaHeader[0]
: uaHeader;
const result = await authService.authenticate(token, {
ip: socket.handshake.address,
userAgent: userAgent ?? undefined,
});
if (result.reauth) {
console.info(