/**
 * JWT-related configuration constants
 *
 * ⚠️ Security note:
 * These values should ideally come from environment variables
 * instead of being hard-coded in source code.
 */
export const jwtConstants = {
  secret: process.env.JWT_SECRET,

  accesstokenexpirary: '15m',
  refreshtokenexpirary: '30d',

  // 30 days in seconds
  refreshtokenexpirarytime: 30 * 24 * 60 * 60, // 2592000
};

/**
 * Social login provider configuration
 * Used to validate OAuth tokens received from clients
 */
export const socialLoginConstant = {
  /**
   * Google token verification endpoint
   * The `id_token` is appended at runtime
   */
  google_url: 'https://oauth2.googleapis.com/tokeninfo?id_token=',

  /**
   * Facebook Graph API endpoint
   * Used to fetch user profile details using access token
   */
  facebook_url:
    'https://graph.facebook.com/me?fields=name,email,picture&access_token=',
};

/**
 * Default database schema name
 *
 * Used in:
 * - TypeORM schema mapping
 * - Raw SQL queries
 * - Multi-schema database setups
 */
export const SCHEMA_NAME = 'device_management';

export const DEFAULT_USER_ID = 76;
