ETASCOM CRM V3 - Documentation API
    Preparing search index...
    • POST(
          req: NextRequest,
      ): Promise<
          | NextResponse<{ success: boolean; error: string; message: string }>
          | NextResponse<
              {
                  success: boolean;
                  requiresTwoFactor: boolean;
                  message: string;
                  tempToken: string;
              },
          >
          | NextResponse<
              {
                  success: boolean;
                  message: string;
                  token: string;
                  user: {
                      id: string;
                      email: string;
                      name: string
                      | null;
                      avatar: string | null;
                      status: "ACTIVE";
                      role: { id: string; name: string; permissions: {}[] };
                      twoFactorEnabled: boolean;
                  };
                  expiresIn: string;
              },
          >,
      >

      POST /api/mobile/auth

      Body: { email: string password: string twoFactorCode?: string // Optionnel, requis si 2FA activé }

      Parameters

      • req: NextRequest

      Returns Promise<
          | NextResponse<{ success: boolean; error: string; message: string }>
          | NextResponse<
              {
                  success: boolean;
                  requiresTwoFactor: boolean;
                  message: string;
                  tempToken: string;
              },
          >
          | NextResponse<
              {
                  success: boolean;
                  message: string;
                  token: string;
                  user: {
                      id: string;
                      email: string;
                      name: string
                      | null;
                      avatar: string | null;
                      status: "ACTIVE";
                      role: { id: string; name: string; permissions: {}[] };
                      twoFactorEnabled: boolean;
                  };
                  expiresIn: string;
              },
          >,
      >