import fp from 'fastify-plugin';
import { OAuth2Client } from 'google-auth-library';
import type { FastifyInstance } from 'fastify';

export default fp(async function googleAuthPlugin(fastify: FastifyInstance) {
  const googleClient = new OAuth2Client(process.env.GOOGLE_CLIENT_ID);
  fastify.decorate('googleClient', googleClient);
});
