[gnome-software/wip/kalev/drop-snap-support: 2/2] Drop purchasing and auth support



commit d7ccc21523d45ca4dc390e996db46c6e70e9d41f
Author: Kalev Lember <klember redhat com>
Date:   Tue Jul 9 18:50:41 2019 +0300

    Drop purchasing and auth support
    
    This was only used by the snap plugin, which was dropped as Ubuntu is
    switching to a new snap-store app instead of using gnome-software.

 contrib/gnome-software.spec.in              |   1 -
 data/org.gnome.software.gschema.xml         |   7 -
 doc/api/gnome-software-docs.xml             |   1 -
 lib/gnome-software.h                        |   1 -
 lib/gs-app-list.c                           |   3 +-
 lib/gs-app.c                                |  65 +---
 lib/gs-app.h                                |   6 -
 lib/gs-auth.c                               | 470 ---------------------------
 lib/gs-auth.h                               |  39 ---
 lib/gs-plugin-job-private.h                 |   2 -
 lib/gs-plugin-job.c                         |  64 ----
 lib/gs-plugin-job.h                         |   6 -
 lib/gs-plugin-loader.c                      |  53 ----
 lib/gs-plugin-loader.h                      |   4 -
 lib/gs-plugin-private.h                     |   2 -
 lib/gs-plugin-types.h                       |  10 -
 lib/gs-plugin-vfuncs.h                      |  22 --
 lib/gs-plugin.c                             |  75 -----
 lib/gs-plugin.h                             |   5 -
 lib/gs-price.c                              | 160 ----------
 lib/gs-price.h                              |  31 --
 lib/meson.build                             |   4 -
 plugins/dummy/gs-plugin-dummy.c             |  45 ---
 plugins/dummy/gs-self-test.c                |  27 --
 plugins/eos-updater/gs-plugin-eos-updater.c |   2 -
 plugins/flatpak/gs-flatpak.c                |   1 -
 plugins/fwupd/gs-plugin-fwupd.c             |   2 -
 po/POTFILES.in                              |   3 -
 src/gnome-software.gresource.xml            |   1 -
 src/gs-auth-dialog.c                        | 475 ----------------------------
 src/gs-auth-dialog.h                        |  25 --
 src/gs-auth-dialog.ui                       | 129 --------
 src/gs-common.c                             |  22 --
 src/gs-common.h                             |   1 -
 src/gs-details-page.c                       |  53 ----
 src/gs-page.c                               | 330 +------------------
 src/gs-page.h                               |   8 -
 src/gs-search-page.c                        |   2 +-
 src/gs-shell.c                              | 274 ----------------
 src/gs-updates-page.c                       |   1 -
 src/meson.build                             |   1 -
 41 files changed, 13 insertions(+), 2420 deletions(-)
---
diff --git a/contrib/gnome-software.spec.in b/contrib/gnome-software.spec.in
index 576f33de..3641916b 100644
--- a/contrib/gnome-software.spec.in
+++ b/contrib/gnome-software.spec.in
@@ -45,7 +45,6 @@ BuildRequires: rpm-devel
 BuildRequires: rpm-ostree-devel
 BuildRequires: libgudev1-devel
 BuildRequires: valgrind-devel
-BuildRequires: liboauth-devel
 
 Requires: appstream-data
 %if 0%{?fedora}
diff --git a/data/org.gnome.software.gschema.xml b/data/org.gnome.software.gschema.xml
index 97780e0d..fab37c9e 100644
--- a/data/org.gnome.software.gschema.xml
+++ b/data/org.gnome.software.gschema.xml
@@ -139,12 +139,5 @@
       <default>true</default>
       <summary>Enable GNOME Shell extensions repository</summary>
     </key>
-    <child name="auth" schema="org.gnome.software.auth"/>
-  </schema>
-  <schema id="org.gnome.software.auth" gettext-domain="gnome-software">
-    <key name="account-id" type="s">
-      <default>''</default>
-      <summary>A string storing the gnome-online-account id used to login</summary>
-    </key>
   </schema>
 </schemalist>
diff --git a/doc/api/gnome-software-docs.xml b/doc/api/gnome-software-docs.xml
index cce7512a..385ea5cd 100644
--- a/doc/api/gnome-software-docs.xml
+++ b/doc/api/gnome-software-docs.xml
@@ -603,7 +603,6 @@ gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
     <xi:include href="xml/gs-app-list.xml"/>
     <xi:include href="xml/gs-app.xml"/>
     <xi:include href="xml/gs-category.xml"/>
-    <xi:include href="xml/gs-auth.xml"/>
     <xi:include href="xml/gs-os-release.xml"/>
     <xi:include href="xml/gs-plugin.xml"/>
     <xi:include href="xml/gs-plugin-event.xml"/>
diff --git a/lib/gnome-software.h b/lib/gnome-software.h
index f90b17f5..2833d0ff 100644
--- a/lib/gnome-software.h
+++ b/lib/gnome-software.h
@@ -14,7 +14,6 @@
 #include <gs-app.h>
 #include <gs-app-list.h>
 #include <gs-app-collation.h>
-#include <gs-auth.h>
 #include <gs-autocleanups.h>
 #include <gs-category.h>
 #include <gs-os-release.h>
diff --git a/lib/gs-app-list.c b/lib/gs-app-list.c
index 00574e75..0acf7fe5 100644
--- a/lib/gs-app-list.c
+++ b/lib/gs-app-list.c
@@ -157,8 +157,7 @@ gs_app_list_invalidate_state (GsAppList *self)
                GsApp *app_tmp = g_ptr_array_index (apps, i);
                AsAppState state_tmp = gs_app_get_state (app_tmp);
                if (state_tmp == AS_APP_STATE_INSTALLING ||
-                   state_tmp == AS_APP_STATE_REMOVING ||
-                   state_tmp == AS_APP_STATE_PURCHASING) {
+                   state_tmp == AS_APP_STATE_REMOVING) {
                        state = state_tmp;
                        break;
                }
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 2bc32011..476ec62e 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -112,7 +112,6 @@ typedef struct
        GFile                   *local_file;
        AsContentRating         *content_rating;
        GdkPixbuf               *pixbuf;
-       GsPrice                 *price;
        GCancellable            *cancellable;
        GsPluginAction           pending_action;
        GsAppPermissions         permissions;
@@ -587,10 +586,6 @@ gs_app_to_string_append (GsApp *app, GString *str)
                gs_app_kv_size (str, "size-installed", priv->size_installed);
        if (priv->size_download != 0)
                gs_app_kv_size (str, "size-download", gs_app_get_size_download (app));
-       if (priv->price != NULL)
-               gs_app_kv_printf (str, "price", "%s %.2f",
-                                 gs_price_get_currency (priv->price),
-                                 gs_price_get_amount (priv->price));
        for (i = 0; i < gs_app_list_length (priv->related); i++) {
                GsApp *app_tmp = gs_app_list_index (priv->related, i);
                const gchar *id = gs_app_get_unique_id (app_tmp);
@@ -914,8 +909,7 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
                    state == AS_APP_STATE_AVAILABLE_LOCAL ||
                    state == AS_APP_STATE_UPDATABLE ||
                    state == AS_APP_STATE_UPDATABLE_LIVE ||
-                   state == AS_APP_STATE_UNAVAILABLE ||
-                   state == AS_APP_STATE_PURCHASABLE)
+                   state == AS_APP_STATE_UNAVAILABLE)
                        state_change_ok = TRUE;
                break;
        case AS_APP_STATE_INSTALLED:
@@ -953,7 +947,6 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
                /* removing has to go into an stable state */
                if (state == AS_APP_STATE_UNKNOWN ||
                    state == AS_APP_STATE_AVAILABLE ||
-                   state == AS_APP_STATE_PURCHASABLE ||
                    state == AS_APP_STATE_INSTALLED)
                        state_change_ok = TRUE;
                break;
@@ -983,19 +976,6 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
                    state == AS_APP_STATE_INSTALLING)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_PURCHASABLE:
-               /* local has to go into an action state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_PURCHASING)
-                       state_change_ok = TRUE;
-               break;
-       case AS_APP_STATE_PURCHASING:
-               /* purchasing has to go into an stable state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_AVAILABLE ||
-                   state == AS_APP_STATE_PURCHASABLE)
-                       state_change_ok = TRUE;
-               break;
        default:
                g_warning ("state %s unhandled",
                           as_app_state_to_string (priv->state));
@@ -1022,7 +1002,6 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
        case AS_APP_STATE_INSTALLING:
        case AS_APP_STATE_REMOVING:
        case AS_APP_STATE_QUEUED_FOR_INSTALL:
-       case AS_APP_STATE_PURCHASING:
                /* transient, so ignore */
                break;
        default:
@@ -1871,46 +1850,6 @@ gs_app_set_pixbuf (GsApp *app, GdkPixbuf *pixbuf)
        g_set_object (&priv->pixbuf, pixbuf);
 }
 
-/**
- * gs_app_get_price:
- * @app: a #GsApp
- *
- * Gets the price required to purchase the application.
- *
- * Returns: (transfer none): a #GsPrice, or %NULL
- *
- * Since: 3.26
- **/
-GsPrice *
-gs_app_get_price (GsApp *app)
-{
-       GsAppPrivate *priv = gs_app_get_instance_private (app);
-       g_return_val_if_fail (GS_IS_APP (app), NULL);
-       return priv->price;
-}
-
-/**
- * gs_app_set_price:
- * @app: a #GsApp
- * @amount: the amount of this price, e.g. 0.99
- * @currency: an ISO 4217 currency code, e.g. "USD"
- *
- * Sets a price required to purchase the application.
- *
- * Since: 3.26
- **/
-void
-gs_app_set_price (GsApp *app, gdouble amount, const gchar *currency)
-{
-       GsAppPrivate *priv = gs_app_get_instance_private (app);
-       g_autoptr(GMutexLocker) locker = NULL;
-       g_return_if_fail (GS_IS_APP (app));
-       locker = g_mutex_locker_new (&priv->mutex);
-       if (priv->price != NULL)
-               g_object_unref (priv->price);
-       priv->price = gs_price_new (amount, currency);
-}
-
 typedef enum {
        GS_APP_VERSION_FIXUP_RELEASE            = 1,
        GS_APP_VERSION_FIXUP_DISTRO_SUFFIX      = 2,
@@ -4204,8 +4143,6 @@ gs_app_finalize (GObject *object)
                g_object_unref (priv->content_rating);
        if (priv->pixbuf != NULL)
                g_object_unref (priv->pixbuf);
-       if (priv->price != NULL)
-               g_object_unref (priv->price);
 
        G_OBJECT_CLASS (gs_app_parent_class)->finalize (object);
 }
diff --git a/lib/gs-app.h b/lib/gs-app.h
index cd185154..cc3aa9cc 100644
--- a/lib/gs-app.h
+++ b/lib/gs-app.h
@@ -13,8 +13,6 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <appstream-glib.h>
 
-#include "gs-price.h"
-
 G_BEGIN_DECLS
 
 #define GS_TYPE_APP (gs_app_get_type ())
@@ -281,10 +279,6 @@ void                gs_app_set_management_plugin   (GsApp          *app,
 GdkPixbuf      *gs_app_get_pixbuf              (GsApp          *app);
 void            gs_app_set_pixbuf              (GsApp          *app,
                                                 GdkPixbuf      *pixbuf);
-GsPrice                *gs_app_get_price               (GsApp          *app);
-void            gs_app_set_price               (GsApp          *app,
-                                                gdouble         amount,
-                                                const gchar    *currency);
 GPtrArray      *gs_app_get_icons               (GsApp          *app);
 void            gs_app_add_icon                (GsApp          *app,
                                                 AsIcon         *icon);
diff --git a/lib/gs-plugin-job-private.h b/lib/gs-plugin-job-private.h
index 64ee39b7..0fa0d2d0 100644
--- a/lib/gs-plugin-job-private.h
+++ b/lib/gs-plugin-job-private.h
@@ -30,14 +30,12 @@ guint64                      gs_plugin_job_get_age                  (GsPluginJob    
*self);
 GsAppListSortFunc       gs_plugin_job_get_sort_func            (GsPluginJob    *self);
 gpointer                gs_plugin_job_get_sort_func_data       (GsPluginJob    *self);
 const gchar            *gs_plugin_job_get_search               (GsPluginJob    *self);
-GsAuth                 *gs_plugin_job_get_auth                 (GsPluginJob    *self);
 GsApp                  *gs_plugin_job_get_app                  (GsPluginJob    *self);
 GsAppList              *gs_plugin_job_get_list                 (GsPluginJob    *self);
 GFile                  *gs_plugin_job_get_file                 (GsPluginJob    *self);
 GsPlugin               *gs_plugin_job_get_plugin               (GsPluginJob    *self);
 GsCategory             *gs_plugin_job_get_category             (GsPluginJob    *self);
 AsReview               *gs_plugin_job_get_review               (GsPluginJob    *self);
-GsPrice                        *gs_plugin_job_get_price                (GsPluginJob    *self);
 gchar                  *gs_plugin_job_to_string                (GsPluginJob    *self);
 void                    gs_plugin_job_set_action               (GsPluginJob    *self,
                                                                 GsPluginAction  action);
diff --git a/lib/gs-plugin-job.c b/lib/gs-plugin-job.c
index bc001011..24830a9b 100644
--- a/lib/gs-plugin-job.c
+++ b/lib/gs-plugin-job.c
@@ -28,13 +28,11 @@ struct _GsPluginJob
        GsAppListSortFunc        sort_func;
        gpointer                 sort_func_data;
        gchar                   *search;
-       GsAuth                  *auth;
        GsApp                   *app;
        GsAppList               *list;
        GFile                   *file;
        GsCategory              *category;
        AsReview                *review;
-       GsPrice                 *price;
        gint64                   time_created;
 };
 
@@ -47,14 +45,12 @@ enum {
        PROP_FILTER_FLAGS,
        PROP_DEDUPE_FLAGS,
        PROP_INTERACTIVE,
-       PROP_AUTH,
        PROP_APP,
        PROP_LIST,
        PROP_FILE,
        PROP_CATEGORY,
        PROP_REVIEW,
        PROP_MAX_RESULTS,
-       PROP_PRICE,
        PROP_TIMEOUT,
        PROP_LAST
 };
@@ -111,14 +107,6 @@ gs_plugin_job_to_string (GsPluginJob *self)
                g_string_append_printf (str, " with review=%s",
                                        as_review_get_id (self->review));
        }
-       if (self->price != NULL) {
-               g_autofree gchar *price_string = gs_price_to_string (self->price);
-               g_string_append_printf (str, " with price=%s", price_string);
-       }
-       if (self->auth != NULL) {
-               g_string_append_printf (str, " with auth=%s",
-                                       gs_auth_get_auth_id (self->auth));
-       }
        if (self->file != NULL) {
                g_autofree gchar *path = g_file_get_path (self->file);
                g_string_append_printf (str, " with file=%s", path);
@@ -321,20 +309,6 @@ gs_plugin_job_get_search (GsPluginJob *self)
        return self->search;
 }
 
-void
-gs_plugin_job_set_auth (GsPluginJob *self, GsAuth *auth)
-{
-       g_return_if_fail (GS_IS_PLUGIN_JOB (self));
-       g_set_object (&self->auth, auth);
-}
-
-GsAuth *
-gs_plugin_job_get_auth (GsPluginJob *self)
-{
-       g_return_val_if_fail (GS_IS_PLUGIN_JOB (self), NULL);
-       return self->auth;
-}
-
 void
 gs_plugin_job_set_app (GsPluginJob *self, GsApp *app)
 {
@@ -425,20 +399,6 @@ gs_plugin_job_get_review (GsPluginJob *self)
        return self->review;
 }
 
-void
-gs_plugin_job_set_price (GsPluginJob *self, GsPrice *price)
-{
-       g_return_if_fail (GS_IS_PLUGIN_JOB (self));
-       g_set_object (&self->price, price);
-}
-
-GsPrice *
-gs_plugin_job_get_price (GsPluginJob *self)
-{
-       g_return_val_if_fail (GS_IS_PLUGIN_JOB (self), NULL);
-       return self->price;
-}
-
 static void
 gs_plugin_job_get_property (GObject *obj, guint prop_id, GValue *value, GParamSpec *pspec)
 {
@@ -466,9 +426,6 @@ gs_plugin_job_get_property (GObject *obj, guint prop_id, GValue *value, GParamSp
        case PROP_SEARCH:
                g_value_set_string (value, self->search);
                break;
-       case PROP_AUTH:
-               g_value_set_object (value, self->auth);
-               break;
        case PROP_APP:
                g_value_set_object (value, self->app);
                break;
@@ -484,9 +441,6 @@ gs_plugin_job_get_property (GObject *obj, guint prop_id, GValue *value, GParamSp
        case PROP_REVIEW:
                g_value_set_object (value, self->review);
                break;
-       case PROP_PRICE:
-               g_value_set_object (value, self->price);
-               break;
        case PROP_MAX_RESULTS:
                g_value_set_uint (value, self->max_results);
                break;
@@ -526,9 +480,6 @@ gs_plugin_job_set_property (GObject *obj, guint prop_id, const GValue *value, GP
        case PROP_SEARCH:
                gs_plugin_job_set_search (self, g_value_get_string (value));
                break;
-       case PROP_AUTH:
-               gs_plugin_job_set_auth (self, g_value_get_object (value));
-               break;
        case PROP_APP:
                gs_plugin_job_set_app (self, g_value_get_object (value));
                break;
@@ -550,9 +501,6 @@ gs_plugin_job_set_property (GObject *obj, guint prop_id, const GValue *value, GP
        case PROP_TIMEOUT:
                gs_plugin_job_set_timeout (self, g_value_get_uint (value));
                break;
-       case PROP_PRICE:
-               gs_plugin_job_set_price (self, g_value_get_object (value));
-               break;
        default:
                G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
                break;
@@ -564,14 +512,12 @@ gs_plugin_job_finalize (GObject *obj)
 {
        GsPluginJob *self = GS_PLUGIN_JOB (obj);
        g_free (self->search);
-       g_clear_object (&self->auth);
        g_clear_object (&self->app);
        g_clear_object (&self->list);
        g_clear_object (&self->file);
        g_clear_object (&self->plugin);
        g_clear_object (&self->category);
        g_clear_object (&self->review);
-       g_clear_object (&self->price);
        G_OBJECT_CLASS (gs_plugin_job_parent_class)->finalize (obj);
 }
 
@@ -622,11 +568,6 @@ gs_plugin_job_class_init (GsPluginJobClass *klass)
                                     G_PARAM_READWRITE);
        g_object_class_install_property (object_class, PROP_SEARCH, pspec);
 
-       pspec = g_param_spec_object ("auth", NULL, NULL,
-                                    GS_TYPE_AUTH,
-                                    G_PARAM_READWRITE);
-       g_object_class_install_property (object_class, PROP_AUTH, pspec);
-
        pspec = g_param_spec_object ("app", NULL, NULL,
                                     GS_TYPE_APP,
                                     G_PARAM_READWRITE);
@@ -661,11 +602,6 @@ gs_plugin_job_class_init (GsPluginJobClass *klass)
                                   0, G_MAXUINT, 60,
                                   G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
        g_object_class_install_property (object_class, PROP_TIMEOUT, pspec);
-
-       pspec = g_param_spec_object ("price", NULL, NULL,
-                                    GS_TYPE_PRICE,
-                                    G_PARAM_READWRITE);
-       g_object_class_install_property (object_class, PROP_PRICE, pspec);
 }
 
 static void
diff --git a/lib/gs-plugin-job.h b/lib/gs-plugin-job.h
index a9863343..5100fdf0 100644
--- a/lib/gs-plugin-job.h
+++ b/lib/gs-plugin-job.h
@@ -10,10 +10,8 @@
 #include <glib-object.h>
 
 #include "gs-app-list-private.h"
-#include "gs-auth.h"
 #include "gs-category.h"
 #include "gs-plugin-types.h"
-#include "gs-price.h"
 
 G_BEGIN_DECLS
 
@@ -41,8 +39,6 @@ void           gs_plugin_job_set_sort_func_data       (GsPluginJob    *self,
                                                         gpointer        sort_func_data);
 void            gs_plugin_job_set_search               (GsPluginJob    *self,
                                                         const gchar    *search);
-void            gs_plugin_job_set_auth                 (GsPluginJob    *self,
-                                                        GsAuth         *auth);
 void            gs_plugin_job_set_app                  (GsPluginJob    *self,
                                                         GsApp          *app);
 void            gs_plugin_job_set_list                 (GsPluginJob    *self,
@@ -55,8 +51,6 @@ void           gs_plugin_job_set_category             (GsPluginJob    *self,
                                                         GsCategory     *category);
 void            gs_plugin_job_set_review               (GsPluginJob    *self,
                                                         AsReview       *review);
-void            gs_plugin_job_set_price                (GsPluginJob    *self,
-                                                        GsPrice        *price);
 
 #define                 gs_plugin_job_newv(a,...)              
GS_PLUGIN_JOB(g_object_new(GS_TYPE_PLUGIN_JOB, "action", a, __VA_ARGS__))
 
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 17b010e9..cf734061 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -36,7 +36,6 @@ typedef struct
        gchar                   *language;
        gboolean                 plugin_dir_dirty;
        SoupSession             *soup_session;
-       GPtrArray               *auth_array;
        GPtrArray               *file_monitors;
        GsPluginStatus           global_status_last;
 
@@ -122,20 +121,11 @@ typedef gboolean   (*GsPluginActionFunc)          (GsPlugin       *plugin,
                                                         GsApp          *app,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
-typedef gboolean        (*GsPluginPurchaseFunc)        (GsPlugin       *plugin,
-                                                        GsApp          *app,
-                                                        GsPrice        *price,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
 typedef gboolean        (*GsPluginReviewFunc)          (GsPlugin       *plugin,
                                                         GsApp          *app,
                                                         AsReview       *review,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
-typedef gboolean        (*GsPluginAuthFunc)            (GsPlugin       *plugin,
-                                                        GsAuth         *auth,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
 typedef gboolean        (*GsPluginRefineFunc)          (GsPlugin       *plugin,
                                                         GsAppList      *list,
                                                         GsPluginRefineFlags refine_flags,
@@ -369,14 +359,6 @@ gs_plugin_loader_is_error_fatal (const GError *err)
 {
        if (g_error_matches (err, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_TIMED_OUT))
                return TRUE;
-       if (g_error_matches (err, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_AUTH_REQUIRED))
-               return TRUE;
-       if (g_error_matches (err, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_AUTH_INVALID))
-               return TRUE;
-       if (g_error_matches (err, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_PURCHASE_NOT_SETUP))
-               return TRUE;
-       if (g_error_matches (err, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_PURCHASE_DECLINED))
-               return TRUE;
        return FALSE;
 }
 
@@ -603,14 +585,6 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
                        ret = plugin_func (plugin, app, cancellable, &error_local);
                }
                break;
-       case GS_PLUGIN_ACTION_PURCHASE:
-               {
-                       GsPluginPurchaseFunc plugin_func = func;
-                       ret = plugin_func (plugin, app,
-                                          gs_plugin_job_get_price (helper->plugin_job),
-                                          cancellable, &error_local);
-               }
-               break;
        case GS_PLUGIN_ACTION_REVIEW_SUBMIT:
        case GS_PLUGIN_ACTION_REVIEW_UPVOTE:
        case GS_PLUGIN_ACTION_REVIEW_DOWNVOTE:
@@ -1147,7 +1121,6 @@ gs_plugin_loader_app_is_valid_installed (GsApp *app, gpointer user_data)
        switch (gs_app_get_state (app)) {
        case AS_APP_STATE_INSTALLING:
        case AS_APP_STATE_REMOVING:
-       case AS_APP_STATE_PURCHASING:
                return TRUE;
                break;
        default:
@@ -2092,7 +2065,6 @@ gs_plugin_loader_open_plugin (GsPluginLoader *plugin_loader,
                          G_CALLBACK (gs_plugin_loader_allow_updates_cb),
                          plugin_loader);
        gs_plugin_set_soup_session (plugin, priv->soup_session);
-       gs_plugin_set_auth_array (plugin, priv->auth_array);
        gs_plugin_set_locale (plugin, priv->locale);
        gs_plugin_set_language (plugin, priv->language);
        gs_plugin_set_scale (plugin, gs_plugin_loader_get_scale (plugin_loader));
@@ -2123,29 +2095,6 @@ gs_plugin_loader_get_scale (GsPluginLoader *plugin_loader)
        return priv->scale;
 }
 
-GsAuth *
-gs_plugin_loader_get_auth_by_id (GsPluginLoader *plugin_loader,
-                                const gchar *auth_id)
-{
-       GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
-       guint i;
-
-       /* match on ID */
-       for (i = 0; i < priv->auth_array->len; i++) {
-               GsAuth *auth = g_ptr_array_index (priv->auth_array, i);
-               if (g_strcmp0 (gs_auth_get_auth_id (auth), auth_id) == 0)
-                       return auth;
-       }
-       return NULL;
-}
-
-GPtrArray *
-gs_plugin_loader_get_auths (GsPluginLoader *plugin_loader)
-{
-       GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
-       return priv->auth_array;
-}
-
 void
 gs_plugin_loader_add_location (GsPluginLoader *plugin_loader, const gchar *location)
 {
@@ -2626,7 +2575,6 @@ gs_plugin_loader_dispose (GObject *object)
        g_clear_object (&priv->network_monitor);
        g_clear_object (&priv->soup_session);
        g_clear_object (&priv->settings);
-       g_clear_pointer (&priv->auth_array, g_ptr_array_unref);
        g_clear_pointer (&priv->pending_apps, g_ptr_array_unref);
 
        G_OBJECT_CLASS (gs_plugin_loader_parent_class)->dispose (object);
@@ -2750,7 +2698,6 @@ gs_plugin_loader_init (GsPluginLoader *plugin_loader)
                                                   get_max_parallel_ops (),
                                                   FALSE,
                                                   NULL);
-       priv->auth_array = g_ptr_array_new_with_free_func ((GFreeFunc) g_object_unref);
        priv->file_monitors = g_ptr_array_new_with_free_func ((GFreeFunc) g_object_unref);
        priv->locations = g_ptr_array_new_with_free_func (g_free);
        priv->settings = g_settings_new ("org.gnome.software");
diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h
index 1d0c10f7..e5083d9e 100644
--- a/lib/gs-plugin-loader.h
+++ b/lib/gs-plugin-loader.h
@@ -11,7 +11,6 @@
 #include <glib-object.h>
 
 #include "gs-app.h"
-#include "gs-auth.h"
 #include "gs-category.h"
 #include "gs-plugin-event.h"
 #include "gs-plugin-private.h"
@@ -64,9 +63,6 @@ gboolean       gs_plugin_loader_get_enabled           (GsPluginLoader *plugin_loader,
                                                         const gchar    *plugin_name);
 void            gs_plugin_loader_add_location          (GsPluginLoader *plugin_loader,
                                                         const gchar    *location);
-GsAuth         *gs_plugin_loader_get_auth_by_id        (GsPluginLoader *plugin_loader,
-                                                        const gchar    *auth_id);
-GPtrArray      *gs_plugin_loader_get_auths             (GsPluginLoader *plugin_loader);
 guint           gs_plugin_loader_get_scale             (GsPluginLoader *plugin_loader);
 void            gs_plugin_loader_set_scale             (GsPluginLoader *plugin_loader,
                                                         guint           scale);
diff --git a/lib/gs-plugin-private.h b/lib/gs-plugin-private.h
index d6a6dfbd..42ad22f9 100644
--- a/lib/gs-plugin-private.h
+++ b/lib/gs-plugin-private.h
@@ -39,8 +39,6 @@ void           gs_plugin_set_locale                   (GsPlugin       *plugin,
                                                         const gchar    *locale);
 void            gs_plugin_set_language                 (GsPlugin       *plugin,
                                                         const gchar    *language);
-void            gs_plugin_set_auth_array               (GsPlugin       *plugin,
-                                                        GPtrArray      *auth_array);
 GPtrArray      *gs_plugin_get_rules                    (GsPlugin       *plugin,
                                                         GsPluginRule    rule);
 gpointer        gs_plugin_get_symbol                   (GsPlugin       *plugin,
diff --git a/lib/gs-plugin-types.h b/lib/gs-plugin-types.h
index a455abff..aa5d1fd6 100644
--- a/lib/gs-plugin-types.h
+++ b/lib/gs-plugin-types.h
@@ -56,8 +56,6 @@ typedef guint64 GsPluginFlags;
  * @GS_PLUGIN_ERROR_NO_NETWORK:                        No network connection available
  * @GS_PLUGIN_ERROR_NO_SECURITY:               Security policy forbid action
  * @GS_PLUGIN_ERROR_NO_SPACE:                  No disk space to allow action
- * @GS_PLUGIN_ERROR_AUTH_REQUIRED:             Authentication was required
- * @GS_PLUGIN_ERROR_AUTH_INVALID:              Provided authentication was invalid
  * @GS_PLUGIN_ERROR_PLUGIN_DEPSOLVE_FAILED:    The plugins installed are incompatible
  * @GS_PLUGIN_ERROR_DOWNLOAD_FAILED:           The download action failed
  * @GS_PLUGIN_ERROR_WRITE_FAILED:              The save-to-disk failed
@@ -66,8 +64,6 @@ typedef guint64 GsPluginFlags;
  * @GS_PLUGIN_ERROR_RESTART_REQUIRED:          A restart is required
  * @GS_PLUGIN_ERROR_AC_POWER_REQUIRED:         AC power is required
  * @GS_PLUGIN_ERROR_TIMED_OUT:                 The job timed out
- * @GS_PLUGIN_ERROR_PURCHASE_NOT_SETUP:                Purchase support not setup
- * @GS_PLUGIN_ERROR_PURCHASE_DECLINED:         Purchase was declined
  *
  * The failure error types.
  **/
@@ -78,8 +74,6 @@ typedef enum {
        GS_PLUGIN_ERROR_NO_NETWORK,
        GS_PLUGIN_ERROR_NO_SECURITY,
        GS_PLUGIN_ERROR_NO_SPACE,
-       GS_PLUGIN_ERROR_AUTH_REQUIRED,
-       GS_PLUGIN_ERROR_AUTH_INVALID,
        GS_PLUGIN_ERROR_PLUGIN_DEPSOLVE_FAILED,
        GS_PLUGIN_ERROR_DOWNLOAD_FAILED,
        GS_PLUGIN_ERROR_WRITE_FAILED,
@@ -88,8 +82,6 @@ typedef enum {
        GS_PLUGIN_ERROR_RESTART_REQUIRED,
        GS_PLUGIN_ERROR_AC_POWER_REQUIRED,
        GS_PLUGIN_ERROR_TIMED_OUT,
-       GS_PLUGIN_ERROR_PURCHASE_NOT_SETUP,
-       GS_PLUGIN_ERROR_PURCHASE_DECLINED,
        /*< private >*/
        GS_PLUGIN_ERROR_LAST
 } GsPluginError;
@@ -226,7 +218,6 @@ typedef enum {
  * @GS_PLUGIN_ACTION_GET_UPDATES_HISTORICAL:    Get the list of historical updates
  * @GS_PLUGIN_ACTION_INITIALIZE:               Initialize the plugin
  * @GS_PLUGIN_ACTION_DESTROY:                  Destroy the plugin
- * @GS_PLUGIN_ACTION_PURCHASE:                 Purchase an app
  * @GS_PLUGIN_ACTION_DOWNLOAD:                 Download an application
  * @GS_PLUGIN_ACTION_GET_ALTERNATES:           Get the alternates for a specific application
  *
@@ -271,7 +262,6 @@ typedef enum {
        GS_PLUGIN_ACTION_GET_UPDATES_HISTORICAL,
        GS_PLUGIN_ACTION_INITIALIZE,
        GS_PLUGIN_ACTION_DESTROY,
-       GS_PLUGIN_ACTION_PURCHASE,
        GS_PLUGIN_ACTION_DOWNLOAD,
        GS_PLUGIN_ACTION_GET_ALTERNATES,
        /*< private >*/
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index d9527bfa..94f63bdb 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -24,7 +24,6 @@
 #include "gs-app.h"
 #include "gs-app-list.h"
 #include "gs-category.h"
-#include "gs-price.h"
 
 G_BEGIN_DECLS
 
@@ -546,27 +545,6 @@ gboolean    gs_plugin_update_cancel                (GsPlugin       *plugin,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
 
-/**
- * gs_plugin_app_purchase:
- * @plugin: a #GsPlugin
- * @app: a #GsApp
- * @price: a #GsPrice
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Purchase the application.
- *
- * NOTE: Once the action is complete, the plugin must set the new state of @app
- * to %AS_APP_STATE_AVAILABLE.
- *
- * Returns: %TRUE for success or if not relevant
- **/
-gboolean        gs_plugin_app_purchase                 (GsPlugin       *plugin,
-                                                        GsApp          *app,
-                                                        GsPrice        *price,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
-
 /**
  * gs_plugin_app_install:
  * @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index eab2287a..ab8c104a 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -47,7 +47,6 @@
 
 typedef struct
 {
-       GPtrArray               *auth_array;
        GHashTable              *cache;
        GMutex                   cache_mutex;
        GModule                 *module;
@@ -209,8 +208,6 @@ gs_plugin_finalize (GObject *object)
        g_free (priv->data);
        g_free (priv->locale);
        g_free (priv->language);
-       if (priv->auth_array != NULL)
-               g_ptr_array_unref (priv->auth_array);
        if (priv->soup_session != NULL)
                g_object_unref (priv->soup_session);
        if (priv->network_monitor != NULL)
@@ -598,64 +595,6 @@ gs_plugin_set_language (GsPlugin *plugin, const gchar *language)
        priv->language = g_strdup (language);
 }
 
-/**
- * gs_plugin_set_auth_array:
- * @plugin: a #GsPlugin
- * @auth_array: (element-type GsAuth): an array
- *
- * Sets the authentication objects that can be added by the plugin.
- *
- * Since: 3.22
- **/
-void
-gs_plugin_set_auth_array (GsPlugin *plugin, GPtrArray *auth_array)
-{
-       GsPluginPrivate *priv = gs_plugin_get_instance_private (plugin);
-       priv->auth_array = g_ptr_array_ref (auth_array);
-}
-
-/**
- * gs_plugin_add_auth:
- * @plugin: a #GsPlugin
- * @auth: a #GsAuth
- *
- * Adds an authentication object that can be used for all the plugins.
- *
- * Since: 3.22
- **/
-void
-gs_plugin_add_auth (GsPlugin *plugin, GsAuth *auth)
-{
-       GsPluginPrivate *priv = gs_plugin_get_instance_private (plugin);
-       g_ptr_array_add (priv->auth_array, g_object_ref (auth));
-}
-
-/**
- * gs_plugin_get_auth_by_id:
- * @plugin: a #GsPlugin
- * @auth_id: an ID, e.g. "dummy-sso"
- *
- * Gets a specific authentication object.
- *
- * Returns: the #GsAuth, or %NULL if not found
- *
- * Since: 3.22
- **/
-GsAuth *
-gs_plugin_get_auth_by_id (GsPlugin *plugin, const gchar *auth_id)
-{
-       GsPluginPrivate *priv = gs_plugin_get_instance_private (plugin);
-       guint i;
-
-       /* match on ID */
-       for (i = 0; i < priv->auth_array->len; i++) {
-               GsAuth *auth = g_ptr_array_index (priv->auth_array, i);
-               if (g_strcmp0 (gs_auth_get_auth_id (auth), auth_id) == 0)
-                       return auth;
-       }
-       return NULL;
-}
-
 /**
  * gs_plugin_get_soup_session:
  * @plugin: a #GsPlugin
@@ -1530,10 +1469,6 @@ gs_plugin_error_to_string (GsPluginError error)
                return "no-security";
        if (error == GS_PLUGIN_ERROR_NO_SPACE)
                return "no-space";
-       if (error == GS_PLUGIN_ERROR_AUTH_REQUIRED)
-               return "auth-required";
-       if (error == GS_PLUGIN_ERROR_AUTH_INVALID)
-               return "auth-invalid";
        if (error == GS_PLUGIN_ERROR_PLUGIN_DEPSOLVE_FAILED)
                return "plugin-depsolve-failed";
        if (error == GS_PLUGIN_ERROR_DOWNLOAD_FAILED)
@@ -1550,10 +1485,6 @@ gs_plugin_error_to_string (GsPluginError error)
                return "ac-power-required";
        if (error == GS_PLUGIN_ERROR_TIMED_OUT)
                return "timed-out";
-       if (error == GS_PLUGIN_ERROR_PURCHASE_NOT_SETUP)
-               return "purchase-not-setup";
-       if (error == GS_PLUGIN_ERROR_PURCHASE_DECLINED)
-               return "purchase-declined";
        return NULL;
 }
 
@@ -1644,8 +1575,6 @@ gs_plugin_action_to_function_name (GsPluginAction action)
                return "gs_plugin_initialize";
        if (action == GS_PLUGIN_ACTION_DESTROY)
                return "gs_plugin_destroy";
-       if (action == GS_PLUGIN_ACTION_PURCHASE)
-               return "gs_plugin_app_purchase";
        if (action == GS_PLUGIN_ACTION_GET_ALTERNATES)
                return "gs_plugin_add_alternates";
        return NULL;
@@ -1740,8 +1669,6 @@ gs_plugin_action_to_string (GsPluginAction action)
                return "initialize";
        if (action == GS_PLUGIN_ACTION_DESTROY)
                return "destroy";
-       if (action == GS_PLUGIN_ACTION_PURCHASE)
-               return "purchase";
        if (action == GS_PLUGIN_ACTION_GET_ALTERNATES)
                return "get-alternates";
        return NULL;
@@ -1836,8 +1763,6 @@ gs_plugin_action_from_string (const gchar *action)
                return GS_PLUGIN_ACTION_INITIALIZE;
        if (g_strcmp0 (action, "destroy") == 0)
                return GS_PLUGIN_ACTION_DESTROY;
-       if (g_strcmp0 (action, "purchase") == 0)
-               return GS_PLUGIN_ACTION_PURCHASE;
        if (g_strcmp0 (action, "get-alternates") == 0)
                return GS_PLUGIN_ACTION_GET_ALTERNATES;
        return GS_PLUGIN_ACTION_UNKNOWN;
diff --git a/lib/gs-plugin.h b/lib/gs-plugin.h
index d4595186..7dd2d864 100644
--- a/lib/gs-plugin.h
+++ b/lib/gs-plugin.h
@@ -15,7 +15,6 @@
 
 #include "gs-app.h"
 #include "gs-app-list.h"
-#include "gs-auth.h"
 #include "gs-category.h"
 #include "gs-plugin-event.h"
 #include "gs-plugin-types.h"
@@ -71,10 +70,6 @@ const gchar  *gs_plugin_get_language                 (GsPlugin       *plugin);
 SoupSession    *gs_plugin_get_soup_session             (GsPlugin       *plugin);
 void            gs_plugin_set_soup_session             (GsPlugin       *plugin,
                                                         SoupSession    *soup_session);
-void            gs_plugin_add_auth                     (GsPlugin       *plugin,
-                                                        GsAuth         *auth);
-GsAuth         *gs_plugin_get_auth_by_id               (GsPlugin       *plugin,
-                                                        const gchar    *auth_id);
 void            gs_plugin_add_rule                     (GsPlugin       *plugin,
                                                         GsPluginRule    rule,
                                                         const gchar    *name);
diff --git a/lib/meson.build b/lib/meson.build
index b74248a5..86c7d378 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -39,14 +39,12 @@ install_headers([
     'gnome-software.h',
     'gs-app.h',
     'gs-app-list.h',
-    'gs-auth.h',
     'gs-category.h',
     'gs-os-release.h',
     'gs-plugin.h',
     'gs-plugin-event.h',
     'gs-plugin-types.h',
     'gs-plugin-vfuncs.h',
-    'gs-price.h',
     'gs-utils.h'
   ],
   subdir : 'gnome-software'
@@ -73,7 +71,6 @@ libgnomesoftware = static_library(
   sources : [
     'gs-app.c',
     'gs-app-list.c',
-    'gs-auth.c',
     'gs-category.c',
     'gs-debug.c',
     'gs-ioprio.c',
@@ -84,7 +81,6 @@ libgnomesoftware = static_library(
     'gs-plugin-job.c',
     'gs-plugin-loader.c',
     'gs-plugin-loader-sync.c',
-    'gs-price.c',
     'gs-test.c',
     'gs-utils.c',
   ],
diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c
index 1b70c085..d426428f 100644
--- a/plugins/dummy/gs-plugin-dummy.c
+++ b/plugins/dummy/gs-plugin-dummy.c
@@ -19,8 +19,6 @@ struct GsPluginData {
        guint                    quirk_id;
        guint                    allow_updates_id;
        gboolean                 allow_updates_inhibit;
-       guint                    has_auth;
-       GsAuth                  *auth;
        GsApp                   *cached_origin;
        GHashTable              *installed_apps;        /* id:1 */
        GHashTable              *available_apps;        /* id:1 */
@@ -54,13 +52,6 @@ gs_plugin_initialize (GsPlugin *plugin)
                        gs_plugin_dummy_allow_updates_cb, plugin);
        }
 
-       /* set up a dummy authentication provider */
-       priv->auth = gs_auth_new (gs_plugin_get_name (plugin), "google", NULL);
-       if (priv->auth != NULL) {
-               gs_auth_set_provider_name (priv->auth, "GNOME SSO");
-               gs_plugin_add_auth (plugin, priv->auth);
-       }
-
        /* add source */
        priv->cached_origin = gs_app_new (gs_plugin_get_name (plugin));
        gs_app_set_kind (priv->cached_origin, AS_APP_KIND_SOURCE);
@@ -102,8 +93,6 @@ gs_plugin_destroy (GsPlugin *plugin)
                g_hash_table_unref (priv->available_apps);
        if (priv->quirk_id > 0)
                g_source_remove (priv->quirk_id);
-       if (priv->auth != NULL)
-               g_object_unref (priv->auth);
        if (priv->cached_origin != NULL)
                g_object_unref (priv->cached_origin);
 }
@@ -871,28 +860,6 @@ gs_plugin_update_cancel (GsPlugin *plugin, GsApp *app,
        return TRUE;
 }
 
-gboolean
-gs_plugin_app_purchase (GsPlugin *plugin,
-                       GsApp *app,
-                       GsPrice *price,
-                       GCancellable *cancellable,
-                       GError **error)
-{
-       g_debug ("Purchasing app");
-
-       /* purchase app */
-       if (g_strcmp0 (gs_app_get_id (app), "chiron-paid.desktop") == 0) {
-               gs_app_set_state (app, AS_APP_STATE_PURCHASING);
-               if (!gs_plugin_dummy_delay (plugin, app, 500, cancellable, error)) {
-                       gs_app_set_state_recover (app);
-                       return FALSE;
-               }
-               gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
-       }
-
-       return TRUE;
-}
-
 gboolean
 gs_plugin_review_submit (GsPlugin *plugin,
                         GsApp *app,
@@ -947,18 +914,6 @@ gs_plugin_review_remove (GsPlugin *plugin,
                         GCancellable *cancellable,
                         GError **error)
 {
-       GsPluginData *priv = gs_plugin_get_data (plugin);
-
-       /* simulate an auth check */
-       if (!priv->has_auth) {
-               g_set_error (error,
-                            GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_AUTH_REQUIRED,
-                            "authentication is required using @%s",
-                            gs_plugin_get_name (plugin));
-               return FALSE;
-       }
-
        /* all okay */
        g_debug ("Removing dummy self-review");
        return TRUE;
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index 3f6b9c8e..8ca5f8ca 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -591,30 +591,6 @@ gs_plugins_dummy_wildcard_func (GsPluginLoader *plugin_loader)
        }
 }
 
-static void
-gs_plugins_dummy_purchase_func (GsPluginLoader *plugin_loader)
-{
-       gboolean ret;
-       g_autoptr(GsApp) app = NULL;
-       g_autoptr(GError) error = NULL;
-       g_autoptr(GsPluginJob) plugin_job = NULL;
-
-       /* get the updates list */
-       app = gs_app_new ("chiron-paid.desktop");
-       gs_app_set_management_plugin (app, "dummy");
-       gs_app_set_state (app, AS_APP_STATE_PURCHASABLE);
-       gs_app_set_price (app, 100, "USD");
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_PURCHASE,
-                                        "app", app,
-                                        "price", gs_app_get_price (app),
-                                        NULL);
-       ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
-       gs_test_flush_main_context ();
-       g_assert_no_error (error);
-       g_assert (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
-}
-
 static void
 plugin_job_action_cb (GObject *source,
                      GAsyncResult *res,
@@ -880,9 +856,6 @@ main (int argc, char **argv)
        g_test_add_data_func ("/gnome-software/plugins/dummy/distro-upgrades",
                              plugin_loader,
                              (GTestDataFunc) gs_plugins_dummy_distro_upgrades_func);
-       g_test_add_data_func ("/gnome-software/plugins/dummy/purchase",
-                             plugin_loader,
-                             (GTestDataFunc) gs_plugins_dummy_purchase_func);
        g_test_add_data_func ("/gnome-software/plugins/dummy/metadata-quirks",
                              plugin_loader,
                              (GTestDataFunc) gs_plugins_dummy_metadata_quirks);
diff --git a/plugins/eos-updater/gs-plugin-eos-updater.c b/plugins/eos-updater/gs-plugin-eos-updater.c
index 55e5d2b6..f38eee50 100644
--- a/plugins/eos-updater/gs-plugin-eos-updater.c
+++ b/plugins/eos-updater/gs-plugin-eos-updater.c
@@ -229,8 +229,6 @@ should_add_os_upgrade (AsAppState state)
        case AS_APP_STATE_QUEUED_FOR_INSTALL:
        case AS_APP_STATE_INSTALLING:
        case AS_APP_STATE_UPDATABLE_LIVE:
-       case AS_APP_STATE_PURCHASABLE:
-       case AS_APP_STATE_PURCHASING:
                return TRUE;
        case AS_APP_STATE_UNKNOWN:
        case AS_APP_STATE_INSTALLED:
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index f1355e5d..16496955 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -793,7 +793,6 @@ gs_flatpak_progress_cb (const gchar *status,
 
                switch (gs_app_get_state (phelper->app)) {
                case AS_APP_STATE_INSTALLING:
-               case AS_APP_STATE_PURCHASING:
                        plugin_status = GS_PLUGIN_STATUS_INSTALLING;
                        break;
                case AS_APP_STATE_REMOVING:
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index 071471b2..e353405a 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -63,8 +63,6 @@ gs_plugin_fwupd_error_convert (GError **perror)
                        error->code = GS_PLUGIN_ERROR_NOT_SUPPORTED;
                        break;
                case FWUPD_ERROR_AUTH_FAILED:
-                       error->code = GS_PLUGIN_ERROR_AUTH_INVALID;
-                       break;
                case FWUPD_ERROR_SIGNATURE_INVALID:
                        error->code = GS_PLUGIN_ERROR_NO_SECURITY;
                        break;
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e9e41ea1..bebf68fe 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -12,8 +12,6 @@ src/gs-app-row.c
 src/gs-app-row.ui
 src/gs-app-tile.c
 src/gs-app-tile.ui
-src/gs-auth-dialog.c
-src/gs-auth-dialog.ui
 lib/gs-category.c
 src/gs-category-page.c
 src/gs-category-page.ui
@@ -47,7 +45,6 @@ lib/gs-plugin-loader.c
 src/gs-popular-tile.c
 src/gs-popular-tile.ui
 src/gs-prefs-dialog.ui
-lib/gs-price.c
 src/gs-removal-dialog.c
 src/gs-removal-dialog.ui
 src/gs-repos-dialog.c
diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
index a8efa6a9..2a523021 100644
--- a/src/gnome-software.gresource.xml
+++ b/src/gnome-software.gresource.xml
@@ -5,7 +5,6 @@
   <file preprocess="xml-stripblanks">gs-app-addon-row.ui</file>
   <file preprocess="xml-stripblanks">gs-app-folder-dialog.ui</file>
   <file preprocess="xml-stripblanks">gs-app-row.ui</file>
-  <file preprocess="xml-stripblanks">gs-auth-dialog.ui</file>
   <file preprocess="xml-stripblanks">gs-category-page.ui</file>
   <file preprocess="xml-stripblanks">gs-category-tile.ui</file>
   <file preprocess="xml-stripblanks">gs-details-page.ui</file>
diff --git a/src/gs-common.c b/src/gs-common.c
index 703e8136..6561c7cf 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -515,28 +515,6 @@ gs_utils_show_error_dialog (GtkWindow *parent,
        gtk_widget_show (dialog);
 }
 
-/**
- * gs_utils_get_error_value:
- * @error: A GError
- *
- * Gets the machine-readable value stored in the error message.
- * The machine readable string is after the first "@", e.g.
- * message = "Requires authentication with @aaa"
- *
- * Returns: a string, or %NULL
- */
-const gchar *
-gs_utils_get_error_value (const GError *error)
-{
-       gchar *str;
-       if (error == NULL)
-               return NULL;
-       str = g_strstr_len (error->message, -1, "@");
-       if (str == NULL)
-               return NULL;
-       return (const gchar *) str + 1;
-}
-
 /**
  * gs_utils_build_unique_id_kind:
  * @kind: A #AsAppKind
diff --git a/src/gs-common.h b/src/gs-common.h
index 89e6db59..6f4ed6dc 100644
--- a/src/gs-common.h
+++ b/src/gs-common.h
@@ -34,7 +34,6 @@ void  gs_image_set_from_pixbuf                (GtkImage               *image,
 gboolean        gs_utils_is_current_desktop    (const gchar    *name);
 void            gs_utils_widget_set_css        (GtkWidget      *widget,
                                                 const gchar    *css);
-const gchar    *gs_utils_get_error_value       (const GError   *error);
 void            gs_utils_show_error_dialog     (GtkWindow      *parent,
                                                 const gchar    *title,
                                                 const gchar    *msg,
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 87f00f12..2a59f8f0 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -18,7 +18,6 @@
 
 #include "gs-details-page.h"
 #include "gs-app-addon-row.h"
-#include "gs-auth-dialog.h"
 #include "gs-history-dialog.h"
 #include "gs-origin-popover-row.h"
 #include "gs-screenshot-image.h"
@@ -797,7 +796,6 @@ static void
 gs_details_page_refresh_buttons (GsDetailsPage *self)
 {
        AsAppState state;
-       GsPrice *price;
        g_autofree gchar *text = NULL;
 
        state = gs_app_get_state (self->app);
@@ -814,15 +812,6 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
        case AS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (self->button_install, FALSE);
                break;
-       case AS_APP_STATE_PURCHASABLE:
-               gtk_widget_set_visible (self->button_install, TRUE);
-               price = gs_app_get_price (self->app);
-               text = gs_price_to_string (price);
-               gtk_button_set_label (GTK_BUTTON (self->button_install), text);
-               break;
-       case AS_APP_STATE_PURCHASING:
-               gtk_widget_set_visible (self->button_install, FALSE);
-               break;
        case AS_APP_STATE_UNKNOWN:
        case AS_APP_STATE_INSTALLED:
        case AS_APP_STATE_REMOVING:
@@ -931,8 +920,6 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
                case AS_APP_STATE_REMOVING:
                case AS_APP_STATE_UNAVAILABLE:
                case AS_APP_STATE_UNKNOWN:
-               case AS_APP_STATE_PURCHASABLE:
-               case AS_APP_STATE_PURCHASING:
                case AS_APP_STATE_QUEUED_FOR_INSTALL:
                        gtk_widget_set_visible (self->button_remove, FALSE);
                        break;
@@ -1430,33 +1417,6 @@ gs_details_page_review_helper_free (GsDetailsPageReviewHelper *helper)
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GsDetailsPageReviewHelper, gs_details_page_review_helper_free);
 
-static void
-gs_details_page_app_set_review_cb (GObject *source,
-                                   GAsyncResult *res,
-                                   gpointer user_data);
-
-static void
-gs_details_page_authenticate_cb (GsPage *page,
-                                gboolean authenticated,
-                                gpointer user_data)
-{
-       g_autoptr(GsDetailsPageReviewHelper) helper = (GsDetailsPageReviewHelper *) user_data;
-       g_autoptr(GsPluginJob) plugin_job = NULL;
-
-       if (!authenticated)
-               return;
-
-       plugin_job = gs_plugin_job_newv (helper->action,
-                                        "app", helper->app,
-                                        "review", helper->review,
-                                        NULL);
-       gs_plugin_loader_job_process_async (helper->self->plugin_loader, plugin_job,
-                                           helper->self->cancellable,
-                                           gs_details_page_app_set_review_cb,
-                                           helper);
-       g_steal_pointer (&helper);
-}
-
 static void
 gs_details_page_app_set_review_cb (GObject *source,
                                    GAsyncResult *res,
@@ -1467,19 +1427,6 @@ gs_details_page_app_set_review_cb (GObject *source,
        g_autoptr(GError) error = NULL;
 
        if (!gs_plugin_loader_job_action_finish (plugin_loader, res, &error)) {
-               /* try to authenticate then retry */
-               if (g_error_matches (error,
-                                    GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_AUTH_REQUIRED)) {
-                       gs_page_authenticate (GS_PAGE (helper->self),
-                                             helper->app,
-                                             gs_utils_get_error_value (error),
-                                             helper->self->cancellable,
-                                             gs_details_page_authenticate_cb,
-                                             helper);
-                       g_steal_pointer (&helper);
-                       return;
-               }
                g_warning ("failed to set review on %s: %s",
                           gs_app_get_id (helper->app), error->message);
                return;
diff --git a/src/gs-page.c b/src/gs-page.c
index 4b8ae790..692737fd 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -13,7 +13,6 @@
 
 #include "gs-page.h"
 #include "gs-common.h"
-#include "gs-auth-dialog.h"
 #include "gs-screenshot-image.h"
 
 typedef struct
@@ -42,7 +41,6 @@ typedef struct {
        GtkWidget       *button_install;
        GsPluginAction   action;
        GsShellInteraction interaction;
-       GsPageAuthCallback callback;
        gpointer         callback_data;
 } GsPageHelper;
 
@@ -62,110 +60,6 @@ gs_page_helper_free (GsPageHelper *helper)
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GsPageHelper, gs_page_helper_free);
 
-static void
-gs_page_authenticate_cb (GtkDialog *dialog,
-                GtkResponseType response_type,
-                gpointer user_data)
-{
-       g_autoptr(GsPageHelper) helper = user_data;
-
-       /* unmap the dialog */
-       gtk_widget_destroy (GTK_WIDGET (dialog));
-
-       if (helper->callback != NULL)
-               helper->callback (helper->page, response_type == GTK_RESPONSE_OK, helper->callback_data);
-}
-
-void
-gs_page_authenticate (GsPage *page,
-                     GsApp *app,
-                     const gchar *auth_id,
-                     GCancellable *cancellable,
-                     GsPageAuthCallback callback,
-                     gpointer user_data)
-{
-       GsPagePrivate *priv = gs_page_get_instance_private (page);
-       g_autoptr(GsPageHelper) helper = NULL;
-       GtkWidget *dialog;
-       g_autoptr(GError) error = NULL;
-
-       helper = g_slice_new0 (GsPageHelper);
-       helper->app = app != NULL ? g_object_ref (app) : NULL;
-       helper->page = g_object_ref (page);
-       helper->callback = callback;
-       helper->callback_data = user_data;
-
-       dialog = gs_auth_dialog_new (priv->plugin_loader,
-                                    app,
-                                    auth_id,
-                                    &error);
-       if (dialog == NULL) {
-               g_warning ("%s", error->message);
-               return;
-       }
-       gs_shell_modal_dialog_present (priv->shell, GTK_DIALOG (dialog));
-       g_signal_connect (dialog, "response",
-                         G_CALLBACK (gs_page_authenticate_cb),
-                         helper);
-       g_steal_pointer (&helper);
-}
-
-static void
-gs_page_app_installed_cb (GObject *source,
-                          GAsyncResult *res,
-                          gpointer user_data);
-
-static void
-gs_page_install_authenticate_cb (GsPage *page,
-                                gboolean authenticated,
-                                gpointer user_data)
-{
-       g_autoptr(GsPageHelper) helper = (GsPageHelper *) user_data;
-       GsPagePrivate *priv = gs_page_get_instance_private (page);
-       g_autoptr(GsPluginJob) plugin_job = NULL;
-
-       if (!authenticated)
-               return;
-
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
-                                        "interactive", TRUE,
-                                        "app", helper->app,
-                                        NULL);
-       gs_plugin_loader_job_process_async (priv->plugin_loader, plugin_job,
-                                           helper->cancellable,
-                                           gs_page_app_installed_cb,
-                                           helper);
-       g_steal_pointer (&helper);
-}
-
-static void
-gs_page_app_removed_cb (GObject *source,
-                        GAsyncResult *res,
-                        gpointer user_data);
-
-static void
-gs_page_remove_authenticate_cb (GsPage *page,
-                               gboolean authenticated,
-                               gpointer user_data)
-{
-       g_autoptr(GsPageHelper) helper = (GsPageHelper *) user_data;
-       GsPagePrivate *priv = gs_page_get_instance_private (page);
-       g_autoptr(GsPluginJob) plugin_job = NULL;
-
-       if (!authenticated)
-               return;
-
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE,
-                                        "interactive", TRUE,
-                                        "app", helper->app,
-                                        NULL);
-       gs_plugin_loader_job_process_async (priv->plugin_loader, plugin_job,
-                                           helper->cancellable,
-                                           gs_page_app_removed_cb,
-                                           helper);
-       g_steal_pointer (&helper);
-}
-
 static void
 gs_page_app_installed_cb (GObject *source,
                           GAsyncResult *res,
@@ -188,20 +82,6 @@ gs_page_app_installed_cb (GObject *source,
                return;
        }
        if (!ret) {
-               /* try to authenticate then retry */
-               if (g_error_matches (error,
-                                    GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_AUTH_REQUIRED)) {
-                       gs_page_authenticate (page,
-                                             helper->app,
-                                             gs_utils_get_error_value (error),
-                                             helper->cancellable,
-                                             gs_page_install_authenticate_cb,
-                                             helper);
-                       g_steal_pointer (&helper);
-                       return;
-               }
-
                g_warning ("failed to install %s: %s",
                           gs_app_get_id (helper->app),
                           error->message);
@@ -249,20 +129,6 @@ gs_page_app_removed_cb (GObject *source,
                return;
        }
        if (!ret) {
-               /* try to authenticate then retry */
-               if (g_error_matches (error,
-                                    GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_AUTH_REQUIRED)) {
-                       gs_page_authenticate (page,
-                                             helper->app,
-                                             gs_utils_get_error_value (error),
-                                             helper->cancellable,
-                                             gs_page_remove_authenticate_cb,
-                                             helper);
-                       g_steal_pointer (&helper);
-                       return;
-               }
-
                g_warning ("failed to remove: %s", error->message);
                return;
        }
@@ -305,147 +171,6 @@ gs_page_set_header_end_widget (GsPage *page, GtkWidget *widget)
        g_set_object (&priv->header_end_widget, widget);
 }
 
-static void
-gs_page_app_purchased_cb (GObject *source,
-                          GAsyncResult *res,
-                          gpointer user_data);
-
-static void
-gs_page_purchase_authenticate_cb (GsPage *page,
-                                 gboolean authenticated,
-                                 gpointer user_data)
-{
-       g_autoptr(GsPageHelper) helper = (GsPageHelper *) user_data;
-       GsPagePrivate *priv = gs_page_get_instance_private (page);
-       g_autoptr(GsPluginJob) plugin_job = NULL;
-
-       if (!authenticated)
-               return;
-
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_PURCHASE,
-                                        "interactive", TRUE,
-                                        "app", helper->app,
-                                        "price", gs_app_get_price (helper->app),
-                                        NULL);
-       gs_plugin_loader_job_process_async (priv->plugin_loader, plugin_job,
-                                           helper->cancellable,
-                                           gs_page_app_purchased_cb,
-                                           helper);
-       g_steal_pointer (&helper);
-}
-
-static void
-gs_page_app_purchased_cb (GObject *source,
-                          GAsyncResult *res,
-                          gpointer user_data)
-{
-       g_autoptr(GsPageHelper) helper = (GsPageHelper *) user_data;
-       GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source);
-       GsPage *page = helper->page;
-       GsPagePrivate *priv = gs_page_get_instance_private (page);
-       gboolean ret;
-       g_autoptr(GsPluginJob) plugin_job = NULL;
-       g_autoptr(GError) error = NULL;
-
-       ret = gs_plugin_loader_job_action_finish (plugin_loader,
-                                                 res,
-                                                 &error);
-       if (g_error_matches (error,
-                            GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_CANCELLED)) {
-               g_debug ("%s", error->message);
-               return;
-       }
-       if (!ret) {
-               /* try to authenticate then retry */
-               if (g_error_matches (error,
-                                    GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_AUTH_REQUIRED)) {
-                       gs_page_authenticate (page,
-                                             helper->app,
-                                             gs_utils_get_error_value (error),
-                                             helper->cancellable,
-                                             gs_page_purchase_authenticate_cb,
-                                             helper);
-                       g_steal_pointer (&helper);
-                       return;
-               } else if (g_error_matches (error,
-                                           GS_PLUGIN_ERROR,
-                                           GS_PLUGIN_ERROR_PURCHASE_NOT_SETUP)) {
-                       const gchar *url;
-
-                       /* have we been given a link */
-                       url = gs_utils_get_error_value (error);
-                       if (url != NULL) {
-                               g_autoptr(GError) error_local = NULL;
-                               g_debug ("showing link in: %s", error->message);
-                               if (!gtk_show_uri_on_window (GTK_WINDOW (gs_shell_get_window (priv->shell)),
-                                                            url,
-                                                            GDK_CURRENT_TIME,
-                                                            &error_local)) {
-                                       g_warning ("failed to show URI %s: %s",
-                                                  url, error_local->message);
-                               }
-                               return;
-                       }
-               }
-
-               g_warning ("failed to purchase %s: %s",
-                          gs_app_get_id (helper->app),
-                          error->message);
-               return;
-       }
-
-       if (gs_app_get_state (helper->app) != AS_APP_STATE_AVAILABLE) {
-               g_warning ("no plugin purchased %s",
-                          gs_app_get_id (helper->app));
-               return;
-       }
-
-       /* now install */
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
-                                        "interactive", TRUE,
-                                        "app", helper->app,
-                                        NULL);
-       gs_plugin_loader_job_process_async (priv->plugin_loader,
-                                           plugin_job,
-                                           helper->cancellable,
-                                           gs_page_app_installed_cb,
-                                           helper);
-       g_steal_pointer (&helper);
-}
-
-static void
-gs_page_install_purchase_response_cb (GtkDialog *dialog,
-                                     gint response,
-                                     gpointer user_data)
-{
-       g_autoptr(GsPageHelper) helper = (GsPageHelper *) user_data;
-       GsPagePrivate *priv = gs_page_get_instance_private (helper->page);
-       g_autoptr(GsPluginJob) plugin_job = NULL;
-
-       /* unmap the dialog */
-       gtk_widget_destroy (GTK_WIDGET (dialog));
-
-       /* not agreed */
-       if (response != GTK_RESPONSE_OK)
-               return;
-
-       g_debug ("purchase %s", gs_app_get_id (helper->app));
-
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_PURCHASE,
-                                        "interactive", TRUE,
-                                        "app", helper->app,
-                                        "price", gs_app_get_price (helper->app),
-                                        NULL);
-       gs_plugin_loader_job_process_async (priv->plugin_loader,
-                                           plugin_job,
-                                           helper->cancellable,
-                                           gs_page_app_purchased_cb,
-                                           helper);
-       g_steal_pointer (&helper);
-}
-
 void
 gs_page_install_app (GsPage *page,
                     GsApp *app,
@@ -454,6 +179,7 @@ gs_page_install_app (GsPage *page,
 {
        GsPagePrivate *priv = gs_page_get_instance_private (page);
        GsPageHelper *helper;
+       g_autoptr(GsPluginJob) plugin_job = NULL;
 
        /* probably non-free */
        if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
@@ -471,51 +197,15 @@ gs_page_install_app (GsPage *page,
        helper->cancellable = g_object_ref (cancellable);
        helper->interaction = interaction;
 
-       /* need to purchase first */
-       if (gs_app_get_state (app) == AS_APP_STATE_PURCHASABLE) {
-               GtkWidget *dialog;
-               g_autofree gchar *title = NULL;
-               g_autofree gchar *message = NULL;
-               g_autofree gchar *price_text = NULL;
-
-               /* TRANSLATORS: this is a prompt message, and '%s' is an
-                * application summary, e.g. 'GNOME Clocks' */
-               title = g_strdup_printf (_("Are you sure you want to purchase %s?"),
-                                        gs_app_get_name (app));
-               price_text = gs_price_to_string (gs_app_get_price (app));
-               /* TRANSLATORS: longer dialog text */
-               message = g_strdup_printf (_("%s will be installed, and you will "
-                                            "be charged %s."),
-                                          gs_app_get_name (app), price_text);
-
-               dialog = gtk_message_dialog_new (gs_shell_get_window (priv->shell),
-                                                GTK_DIALOG_MODAL,
-                                                GTK_MESSAGE_QUESTION,
-                                                GTK_BUTTONS_CANCEL,
-                                                "%s", title);
-               gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                                         "%s", message);
-
-               /* TRANSLATORS: this is button text to purchase the application */
-               gtk_dialog_add_button (GTK_DIALOG (dialog), _("Purchase"), GTK_RESPONSE_OK);
-
-               /* handle this async */
-               g_signal_connect (dialog, "response",
-                                 G_CALLBACK (gs_page_install_purchase_response_cb), helper);
-               gs_shell_modal_dialog_present (priv->shell, GTK_DIALOG (dialog));
-       } else {
-               g_autoptr(GsPluginJob) plugin_job = NULL;
-
-               plugin_job = gs_plugin_job_newv (helper->action,
-                                                "interactive", TRUE,
-                                                "app", helper->app,
-                                                NULL);
-               gs_plugin_loader_job_process_async (priv->plugin_loader,
-                                                   plugin_job,
-                                                   helper->cancellable,
-                                                   gs_page_app_installed_cb,
-                                                   helper);
-       }
+       plugin_job = gs_plugin_job_newv (helper->action,
+                                        "interactive", TRUE,
+                                        "app", helper->app,
+                                        NULL);
+       gs_plugin_loader_job_process_async (priv->plugin_loader,
+                                           plugin_job,
+                                           helper->cancellable,
+                                           gs_page_app_installed_cb,
+                                           helper);
 }
 
 static void
diff --git a/src/gs-page.h b/src/gs-page.h
index ccea9b7b..16527448 100644
--- a/src/gs-page.h
+++ b/src/gs-page.h
@@ -36,8 +36,6 @@ struct _GsPageClass
                                                 GError         **error);
 };
 
-typedef void (*GsPageAuthCallback) (GsPage *page, gboolean authorized, gpointer user_data);
-
 GsPage         *gs_page_new                            (void);
 GsShell                *gs_page_get_shell                      (GsPage         *page);
 GtkWidget      *gs_page_get_header_start_widget        (GsPage         *page);
@@ -46,12 +44,6 @@ void          gs_page_set_header_start_widget        (GsPage         *page,
 GtkWidget      *gs_page_get_header_end_widget          (GsPage         *page);
 void            gs_page_set_header_end_widget          (GsPage         *page,
                                                         GtkWidget      *widget);
-void            gs_page_authenticate                   (GsPage                 *page,
-                                                        GsApp                  *app,
-                                                        const gchar            *auth_id,
-                                                        GCancellable           *cancellable,
-                                                        GsPageAuthCallback      callback,
-                                                        gpointer                user_data);
 void            gs_page_install_app                    (GsPage                 *page,
                                                         GsApp                  *app,
                                                         GsShellInteraction     interaction,
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index 189bd43c..1eb04021 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -50,7 +50,7 @@ gs_search_page_app_row_clicked_cb (GsAppRow *app_row,
 {
        GsApp *app;
        app = gs_app_row_get_app (app_row);
-       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE || gs_app_get_state (app) == 
AS_APP_STATE_PURCHASABLE)
+       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE)
                gs_page_install_app (GS_PAGE (self), app, GS_SHELL_INTERACTION_FULL,
                                     self->cancellable);
        else if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED)
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 029aa49c..0097c882 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -66,7 +66,6 @@ typedef struct
        gchar                   *events_info_uri;
        gboolean                 in_mode_change;
        GsPage                  *page;
-       GSimpleActionGroup      *auth_actions;
 } GsShellPrivate;
 
 G_DEFINE_TYPE_WITH_PRIVATE (GsShell, gs_shell, G_TYPE_OBJECT)
@@ -648,110 +647,6 @@ search_mode_enabled_cb (GtkSearchBar *search_bar, GParamSpec *pspec, GsShell *sh
                                      gtk_search_bar_get_search_mode (search_bar));
 }
 
-static void
-signin_activated_cb (GSimpleAction *action, GVariant *parameter, GsShell *shell)
-{
-       GsShellPrivate *priv = gs_shell_get_instance_private (shell);
-       const gchar *action_name, *auth_id;
-       GsAuth *auth;
-
-       action_name = g_action_get_name (G_ACTION (action));
-       g_return_if_fail (g_str_has_prefix (action_name, "signin-"));
-       auth_id = action_name + strlen ("signin-");
-
-       auth = gs_plugin_loader_get_auth_by_id (priv->plugin_loader, auth_id);
-       g_return_if_fail (auth != NULL);
-
-       gs_page_authenticate (priv->page, NULL,
-                             gs_auth_get_auth_id (auth),
-                             priv->cancellable,
-                             NULL, NULL);
-}
-
-static void
-signout_activated_cb (GSimpleAction *action, GVariant *parameter, GsShell *shell)
-{
-       GsShellPrivate *priv = gs_shell_get_instance_private (shell);
-       const gchar *action_name, *auth_id;
-       GsAuth *auth;
-
-       action_name = g_action_get_name (G_ACTION (action));
-       g_return_if_fail (g_str_has_prefix (action_name, "signout-"));
-       auth_id = action_name + strlen ("signout-");
-
-       auth = gs_plugin_loader_get_auth_by_id (priv->plugin_loader, auth_id);
-       g_return_if_fail (auth != NULL);
-
-       gs_auth_set_goa_object (auth, NULL);
-}
-
-static void
-gs_shell_reload_auth_menus (GsShell *shell)
-{
-       GsShellPrivate *priv = gs_shell_get_instance_private (shell);
-       GMenu *accounts_menu;
-       GPtrArray *auth_array;
-
-       accounts_menu = G_MENU (gtk_builder_get_object (priv->builder, "accounts_menu"));
-       g_menu_remove_all (accounts_menu);
-
-       auth_array = gs_plugin_loader_get_auths (priv->plugin_loader);
-       for (guint i = 0; i < auth_array->len; i++) {
-               GsAuth *auth = g_ptr_array_index (auth_array, i);
-               gboolean logged_in;
-               g_autofree gchar *signin_action_name = NULL;
-               GSimpleAction *signin_action;
-               g_autofree gchar *signin_target = NULL;
-               g_autofree gchar *signout_action_name = NULL;
-               GSimpleAction *signout_action;
-               g_autofree gchar *signout_target = NULL;
-               GoaObject *goa_object;
-               g_autofree gchar *signin_label = NULL;
-               g_autofree gchar *signout_label = NULL;
-               g_autoptr(GMenu) auth_menu = NULL;
-               g_autoptr(GMenuItem) signin_item = NULL;
-               g_autoptr(GMenuItem) signout_item = NULL;
-
-
-               goa_object = gs_auth_peek_goa_object (auth);
-               logged_in = goa_object != NULL;
-
-               auth_menu = g_menu_new ();
-               accounts_menu = G_MENU (gtk_builder_get_object (priv->builder, "accounts_menu"));
-               g_menu_append_section (accounts_menu, gs_auth_get_provider_name (auth), G_MENU_MODEL 
(auth_menu));
-
-               signin_action_name = g_strdup_printf ("signin-%s", gs_auth_get_auth_id (auth));
-               signin_action = G_SIMPLE_ACTION (g_action_map_lookup_action (G_ACTION_MAP 
(priv->auth_actions), signin_action_name));
-               g_simple_action_set_enabled (signin_action, !logged_in);
-
-               signout_action_name = g_strdup_printf ("signout-%s", gs_auth_get_auth_id (auth));
-               signout_action = G_SIMPLE_ACTION (g_action_map_lookup_action (G_ACTION_MAP 
(priv->auth_actions), signout_action_name));
-               g_simple_action_set_enabled (signout_action, logged_in);
-
-
-               if (logged_in) {
-                       GoaAccount *goa_account = goa_object_peek_account (goa_object);
-
-                       /* TRANSLATORS: menu item that signs into the named account with a particular 
username */
-                       signin_label = g_strdup_printf (_("Signed in as %s"),
-                                                       goa_account_get_presentation_identity (goa_account));
-               } else {
-                       /* TRANSLATORS: menu item that signs into the named account */
-                       signin_label = g_strdup_printf (_("Sign in…"));
-               }
-
-               signin_target = g_strdup_printf ("auth.%s", signin_action_name);
-               signin_item = g_menu_item_new (signin_label, signin_target);
-               g_menu_append_item (auth_menu, signin_item);
-
-               /* TRANSLATORS: menu item for signing out from the named account */
-               signout_label = g_strdup_printf (_("Sign out"));
-               signout_target = g_strdup_printf ("auth.%s", signout_action_name);
-               signout_item = g_menu_item_new (signout_label, signout_target);
-               g_menu_append_item (auth_menu, signout_item);
-       }
-}
-
 static gboolean
 window_key_press_event (GtkWidget *win, GdkEventKey *event, GsShell *shell)
 {
@@ -1037,16 +932,6 @@ gs_shell_show_event_refresh (GsShell *shell, GsPluginEvent *event)
                }
                buttons |= GS_SHELL_EVENT_BUTTON_NO_SPACE;
                break;
-       case GS_PLUGIN_ERROR_AUTH_REQUIRED:
-               /* TRANSLATORS: failure text for the in-app notification */
-               g_string_append (str, _("Unable to download updates: "
-                                       "authentication was required"));
-               break;
-       case GS_PLUGIN_ERROR_AUTH_INVALID:
-               /* TRANSLATORS: failure text for the in-app notification */
-               g_string_append (str, _("Unable to download updates: "
-                                       "authentication was invalid"));
-               break;
        case GS_PLUGIN_ERROR_NO_SECURITY:
                /* TRANSLATORS: failure text for the in-app notification */
                g_string_append (str, _("Unable to download updates: you do not have"
@@ -1083,59 +968,6 @@ gs_shell_show_event_refresh (GsShell *shell, GsPluginEvent *event)
        return TRUE;
 }
 
-static gboolean
-gs_shell_show_event_purchase (GsShell *shell, GsPluginEvent *event)
-{
-       GsApp *app = gs_plugin_event_get_app (event);
-       const GError *error = gs_plugin_event_get_error (event);
-       g_autofree gchar *str_app = NULL;
-       g_autoptr(GString) str = g_string_new (NULL);
-
-       str_app = gs_shell_get_title_from_app (app);
-       switch (error->code) {
-       case GS_PLUGIN_ERROR_AUTH_REQUIRED:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the application name (e.g. "GIMP") */
-               g_string_append_printf (str, _("Unable to purchase %s: "
-                                              "authentication was required"),
-                                       str_app);
-               break;
-       case GS_PLUGIN_ERROR_AUTH_INVALID:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the application name (e.g. "GIMP") */
-               g_string_append_printf (str, _("Unable to purchase %s: "
-                                              "authentication was invalid"),
-                                       str_app);
-               break;
-       case GS_PLUGIN_ERROR_PURCHASE_NOT_SETUP:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the application name (e.g. "GIMP") */
-               g_string_append_printf (str, _("Unable to purchase %s: "
-                                              "no payment method setup"),
-                                       str_app);
-               break;
-       case GS_PLUGIN_ERROR_PURCHASE_DECLINED:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the application name (e.g. "GIMP") */
-               g_string_append_printf (str, _("Unable to purchase %s: "
-                                              "payment was declined"),
-                                       str_app);
-               break;
-       default:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the application name (e.g. "GIMP") */
-               g_string_append_printf (str, _("Unable to purchase %s"), str_app);
-               gs_shell_append_detailed_error (shell, str, error);
-               break;
-       }
-       if (str->len == 0)
-               return FALSE;
-
-       /* show in-app notification */
-       gs_shell_show_event_app_notify (shell, str->str, GS_SHELL_EVENT_BUTTON_NONE);
-       return TRUE;
-}
-
 static gboolean
 gs_shell_show_event_install (GsShell *shell, GsPluginEvent *event)
 {
@@ -1204,19 +1036,6 @@ gs_shell_show_event_install (GsShell *shell, GsPluginEvent *event)
                                        str_app);
                buttons |= GS_SHELL_EVENT_BUTTON_NO_SPACE;
                break;
-       case GS_PLUGIN_ERROR_AUTH_REQUIRED:
-               /* TRANSLATORS: failure text for the in-app notification */
-               g_string_append_printf (str, _("Unable to install %s: "
-                                              "authentication was required"),
-                                       str_app);
-               break;
-       case GS_PLUGIN_ERROR_AUTH_INVALID:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the application name (e.g. "GIMP") */
-               g_string_append_printf (str, _("Unable to install %s: "
-                                              "authentication was invalid"),
-                                       str_app);
-               break;
        case GS_PLUGIN_ERROR_NO_SECURITY:
                /* TRANSLATORS: failure text for the in-app notification,
                 * where the %s is the application name (e.g. "GIMP") */
@@ -1328,34 +1147,6 @@ gs_shell_show_event_update (GsShell *shell, GsPluginEvent *event)
                }
                buttons |= GS_SHELL_EVENT_BUTTON_NO_SPACE;
                break;
-       case GS_PLUGIN_ERROR_AUTH_REQUIRED:
-               if (app != NULL) {
-                       str_app = gs_shell_get_title_from_app (app);
-                       /* TRANSLATORS: failure text for the in-app notification,
-                        * where the %s is the application name (e.g. "GIMP") */
-                       g_string_append_printf (str, _("Unable to update %s: "
-                                                      "authentication was required"),
-                                               str_app);
-               } else {
-                       /* TRANSLATORS: failure text for the in-app notification */
-                       g_string_append_printf (str, _("Unable to install updates: "
-                                                      "authentication was required"));
-               }
-               break;
-       case GS_PLUGIN_ERROR_AUTH_INVALID:
-               if (app != NULL) {
-                       str_app = gs_shell_get_title_from_app (app);
-                       /* TRANSLATORS: failure text for the in-app notification,
-                        * where the %s is the application name (e.g. "GIMP") */
-                       g_string_append_printf (str, _("Unable to update %s: "
-                                                      "authentication was invalid"),
-                                               str_app);
-               } else {
-                       /* TRANSLATORS: failure text for the in-app notification */
-                       g_string_append_printf (str, _("Unable to install updates: "
-                                                      "authentication was invalid"));
-               }
-               break;
        case GS_PLUGIN_ERROR_NO_SECURITY:
                if (app != NULL) {
                        str_app = gs_shell_get_title_from_app (app);
@@ -1468,20 +1259,6 @@ gs_shell_show_event_upgrade (GsShell *shell, GsPluginEvent *event)
                                        str_app);
                buttons |= GS_SHELL_EVENT_BUTTON_NO_SPACE;
                break;
-       case GS_PLUGIN_ERROR_AUTH_REQUIRED:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the distro name (e.g. "Fedora 25") */
-               g_string_append_printf (str, _("Unable to upgrade to %s: "
-                                              "authentication was required"),
-                                       str_app);
-               break;
-       case GS_PLUGIN_ERROR_AUTH_INVALID:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the distro name (e.g. "Fedora 25") */
-               g_string_append_printf (str, _("Unable to upgrade to %s: "
-                                              "authentication was invalid"),
-                                       str_app);
-               break;
        case GS_PLUGIN_ERROR_NO_SECURITY:
                /* TRANSLATORS: failure text for the in-app notification,
                 * where the %s is the distro name (e.g. "Fedora 25") */
@@ -1536,18 +1313,6 @@ gs_shell_show_event_remove (GsShell *shell, GsPluginEvent *event)
 
        str_app = gs_shell_get_title_from_app (app);
        switch (error->code) {
-       case GS_PLUGIN_ERROR_AUTH_REQUIRED:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the application name (e.g. "GIMP") */
-               g_string_append_printf (str, _("Unable to remove %s: authentication was required"),
-                                       str_app);
-               break;
-       case GS_PLUGIN_ERROR_AUTH_INVALID:
-               /* TRANSLATORS: failure text for the in-app notification,
-                * where the %s is the application name (e.g. "GIMP") */
-               g_string_append_printf (str, _("Unable to remove %s: authentication was invalid"),
-                                       str_app);
-               break;
        case GS_PLUGIN_ERROR_NO_SECURITY:
                /* TRANSLATORS: failure text for the in-app notification,
                 * where the %s is the application name (e.g. "GIMP") */
@@ -1661,14 +1426,6 @@ gs_shell_show_event_file_to_app (GsShell *shell, GsPluginEvent *event)
        g_autoptr(GString) str = g_string_new (NULL);
 
        switch (error->code) {
-       case GS_PLUGIN_ERROR_NOT_SUPPORTED:
-               /* TRANSLATORS: failure text for the in-app notification */
-               g_string_append (str, _("Failed to install file: not supported"));
-               break;
-       case GS_PLUGIN_ERROR_NO_SECURITY:
-               /* TRANSLATORS: failure text for the in-app notification */
-               g_string_append (str, _("Failed to install file: authentication failed"));
-               break;
        case GS_PLUGIN_ERROR_NO_SPACE:
                /* TRANSLATORS: failure text for the in-app notification */
                g_string_append (str, _("Not enough disk space — free up some space "
@@ -1836,8 +1593,6 @@ gs_shell_show_event (GsShell *shell, GsPluginEvent *event)
        case GS_PLUGIN_ACTION_REFRESH:
        case GS_PLUGIN_ACTION_DOWNLOAD:
                return gs_shell_show_event_refresh (shell, event);
-       case GS_PLUGIN_ACTION_PURCHASE:
-               return gs_shell_show_event_purchase (shell, event);
        case GS_PLUGIN_ACTION_INSTALL:
                return gs_shell_show_event_install (shell, event);
        case GS_PLUGIN_ACTION_UPDATE:
@@ -1966,7 +1721,6 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
        GtkWidget *widget;
        GtkStyleContext *style_context;
        GsPage *page;
-       GPtrArray *auth_array;
 
        g_return_if_fail (GS_IS_SHELL (shell));
 
@@ -2111,33 +1865,6 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
        /* primary menu */
        gs_shell_add_about_menu_item (shell);
 
-       /* auth menu */
-       priv->auth_actions = g_simple_action_group_new ();
-       gtk_widget_insert_action_group (GTK_WIDGET (priv->main_window), "auth", G_ACTION_GROUP 
(priv->auth_actions));
-       auth_array = gs_plugin_loader_get_auths (priv->plugin_loader);
-       for (guint i = 0; i < auth_array->len; i++) {
-               GsAuth *auth = g_ptr_array_index (auth_array, i);
-               g_autoptr(GSimpleAction) signin_action = NULL;
-               g_autofree gchar *signin_action_name = NULL;
-               g_autoptr(GSimpleAction) signout_action = NULL;
-               g_autofree gchar *signout_action_name = NULL;
-
-               signin_action_name = g_strdup_printf ("signin-%s", gs_auth_get_auth_id (auth));
-               signin_action = g_simple_action_new (signin_action_name, NULL);
-               g_signal_connect (signin_action, "activate", G_CALLBACK (signin_activated_cb), shell);
-               g_action_map_add_action (G_ACTION_MAP (priv->auth_actions), G_ACTION (signin_action));
-
-               signout_action_name = g_strdup_printf ("signout-%s", gs_auth_get_auth_id (auth));
-               signout_action = g_simple_action_new (signout_action_name, NULL);
-               g_signal_connect (signout_action, "activate", G_CALLBACK (signout_activated_cb), shell);
-               g_action_map_add_action (G_ACTION_MAP (priv->auth_actions), G_ACTION (signout_action));
-
-               g_signal_connect_object (auth, "changed",
-                                        G_CALLBACK (gs_shell_reload_auth_menus),
-                                        shell, G_CONNECT_SWAPPED);
-               gs_shell_reload_auth_menus (shell);
-       }
-
        /* show loading page, which triggers the initial refresh */
        gs_shell_change_mode (shell, GS_SHELL_MODE_LOADING, NULL, TRUE);
 }
@@ -2327,7 +2054,6 @@ gs_shell_dispose (GObject *object)
        g_clear_pointer (&priv->pages, g_hash_table_unref);
        g_clear_pointer (&priv->events_info_uri, g_free);
        g_clear_pointer (&priv->modal_dialogs, g_ptr_array_unref);
-       g_clear_object (&priv->auth_actions);
 
        G_OBJECT_CLASS (gs_shell_parent_class)->dispose (object);
 }
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 429bf27b..117e7bcd 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -1200,7 +1200,6 @@ gs_shell_update_are_updates_in_progress (GsUpdatesPage *self)
                switch (gs_app_get_state (app)) {
                case AS_APP_STATE_INSTALLING:
                case AS_APP_STATE_REMOVING:
-               case AS_APP_STATE_PURCHASING:
                        return TRUE;
                        break;
                default:
diff --git a/src/meson.build b/src/meson.build
index 9c118ecc..fde9ebd6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -21,7 +21,6 @@ gnome_software_sources = [
   'gs-application.c',
   'gs-app-row.c',
   'gs-app-tile.c',
-  'gs-auth-dialog.c',
   'gs-category-page.c',
   'gs-category-tile.c',
   'gs-common.c',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]