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, + ), ), ], ),