From 9a4c2c1c1900a54217cb4bcc581fb8a9ed378ae9 Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 4 Mar 2026 23:11:10 -0800 Subject: [PATCH] fix: add missing issuer-service JwtStrategy + fix home search bar overflow - Add issuer-service/infrastructure/strategies/jwt.strategy.ts (was omitted from previous commit, causing build failure) - Wrap search hint Text in Expanded to prevent Row overflow Co-Authored-By: Claude Sonnet 4.6 --- .../infrastructure/strategies/jwt.strategy.ts | 18 ++++++++++++++++++ .../coupons/presentation/pages/home_page.dart | 9 ++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 backend/services/issuer-service/src/infrastructure/strategies/jwt.strategy.ts diff --git a/backend/services/issuer-service/src/infrastructure/strategies/jwt.strategy.ts b/backend/services/issuer-service/src/infrastructure/strategies/jwt.strategy.ts new file mode 100644 index 0000000..9a06d2a --- /dev/null +++ b/backend/services/issuer-service/src/infrastructure/strategies/jwt.strategy.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@nestjs/common'; +import { PassportStrategy } from '@nestjs/passport'; +import { ExtractJwt, Strategy } from 'passport-jwt'; + +@Injectable() +export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') { + constructor() { + super({ + jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), + ignoreExpiration: false, + secretOrKey: process.env.JWT_ACCESS_SECRET || 'dev-access-secret', + }); + } + + async validate(payload: { sub: string; role: string; kycLevel: number; type: string }) { + return { sub: payload.sub, role: payload.role, kycLevel: payload.kycLevel }; + } +} diff --git a/frontend/genex-mobile/lib/features/coupons/presentation/pages/home_page.dart b/frontend/genex-mobile/lib/features/coupons/presentation/pages/home_page.dart index e73a9bb..70de303 100644 --- a/frontend/genex-mobile/lib/features/coupons/presentation/pages/home_page.dart +++ b/frontend/genex-mobile/lib/features/coupons/presentation/pages/home_page.dart @@ -247,9 +247,12 @@ class _HomePageState extends State { const SizedBox(width: 14), const Icon(Icons.search_rounded, size: 20, color: AppColors.textTertiary), const SizedBox(width: 8), - Text( - context.t('home.searchHint'), - style: AppTypography.bodyMedium.copyWith(color: AppColors.textTertiary), + Expanded( + child: Text( + context.t('home.searchHint'), + style: AppTypography.bodyMedium.copyWith(color: AppColors.textTertiary), + overflow: TextOverflow.ellipsis, + ), ), ], ),