From 0b06c252a37b7e957be5767b1821c5cb63123918 Mon Sep 17 00:00:00 2001 From: Rokojori Date: Fri, 17 Jul 2026 15:26:14 +0200 Subject: [PATCH] Connector Update --- source/server/auth.ts | 8 +++++--- workspace/index.html | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/server/auth.ts b/source/server/auth.ts index c12d8c2..39fd6d2 100644 --- a/source/server/auth.ts +++ b/source/server/auth.ts @@ -9,7 +9,7 @@ declare global { namespace Express { - interface Request { auth?: AuthPayload; } + interface Request { auth?: AuthPayload; rawToken?: string; } } } @@ -100,7 +100,8 @@ export function jwtMiddleware( req: Request, res: Response, next: NextFunction ) try { - req.auth = jwt.verify( token, JWT_SECRET ) as AuthPayload; + req.auth = jwt.verify( token, JWT_SECRET ) as AuthPayload; + req.rawToken = token; next(); return; } @@ -136,7 +137,8 @@ export function jwtMiddleware( req: Request, res: Response, next: NextFunction ) try { - req.auth = jwt.verify( result.accessToken, JWT_SECRET ) as AuthPayload; + req.auth = jwt.verify( result.accessToken, JWT_SECRET ) as AuthPayload; + req.rawToken = result.accessToken; } catch { diff --git a/workspace/index.html b/workspace/index.html index 2e4fdf9..d999c68 100644 --- a/workspace/index.html +++ b/workspace/index.html @@ -86,7 +86,7 @@

In your service repo

-
git submodule add https://community.rokojori.com/Rokojori/rokojori-auth-connector.git source/auth-connector
+        
git submodule add git@community.rokojori.com:Rokojori/rokojori-auth-connector.git source/auth-connector
 git submodule update --init

This creates source/auth-connector/ inside your service repo.