/* import { authenticatedUserRepository } from "@/contexts/auth/infraestructure";
import passport from "passport";
import { ExtractJwt, Strategy as JwtStrategy } from "passport-jwt";

const SECRET_KEY = process.env.JWT_SECRET || "supersecretkey";

// Configuración de la estrategia JWT
const jwtOptions = {
  jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
  secretOrKey: SECRET_KEY,
};

passport.use(
  new JwtStrategy(jwtOptions, async (payload, done) => {
    try {
      const userResult = await authenticatedUserRepository.findById(payload.userId);
      if (userResult.isFailure) {
        return done(null, false);
      }
      return done(null, userResult.data);
    } catch (error) {
      return done(error, false);
    }
  })
);

export default passport;
 */
