File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
service-core/src/routes/endpoints Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export const syncStreamReactive: SocketRouteGenerator = (router) =>
2929 client_id : params . client_id ,
3030 user_id : context . user_id ! ,
3131 user_agent : context . user_agent ,
32- jwt_exp : { exp : context . token_payload ? .exp }
32+ jwt_exp : context . token_payload ?. exp ? new Date ( context . token_payload . exp ) : undefined
3333 } ;
3434
3535 const streamStart = Date . now ( ) ;
Original file line number Diff line number Diff line change @@ -38,9 +38,7 @@ export const syncStreamed = routeDefinition({
3838 client_id : clientId ,
3939 user_id : payload . context . user_id ! ,
4040 user_agent : userAgent as string ,
41- jwt_exp : {
42- exp : token_payload ?. exp
43- }
41+ jwt_exp : token_payload ?. exp ? new Date ( token_payload ?. exp ) : undefined
4442 } ;
4543
4644 if ( routerEngine . closed ) {
Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ export enum EmitterEngineEvents {
44 SDK_CONNECT_EVENT = 'sdk-connect-event' ,
55 SDK_DISCONNECT_EVENT = 'sdk-disconnect-event'
66}
7- type JwtExp = {
8- exp ?: number ;
9- } ;
107
118export type SubscribeEvents = {
129 [ EmitterEngineEvents . SDK_CONNECT_EVENT ] : SdkConnectEventData ;
@@ -18,7 +15,7 @@ export type SdkUserData = {
1815 client_id ?: string ;
1916 user_id : string ;
2017 user_agent ?: string ;
21- jwt_exp : JwtExp ;
18+ jwt_exp ?: Date ;
2219} ;
2320
2421export type SdkConnectEventData = {
You can’t perform that action at this time.
0 commit comments