Page MenuHomePhabricator

"Authorized apps" shows empty list even when the raw API shows data
Closed, ResolvedPublicBUG REPORT

Description

I have been playing around with my first attempt at an OAuth client and I have found that some of the UI is not updating as I would expect.

The UI view of the apps I have authorized:

Screen Shot 2021-07-18 at 17.39.30.png (424×1 px, 65 KB)

The API result for GET /api/oauth/authorized/:

{
  "count": 5,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 1,
      "user": {
        "id": 2,
        "username": "BDavis (WMF)"
      },
      "application": {
        "name": "toolhub-gadget-demo",
        "redirect_url": "https://toolhub-gadget-demo.toolforge.org/authorize",
        "client_id": "MHe2EkBAsxSoBCeKfoXUkF1GuEk61l4VtD0xt5Kr",
        "user": {
          "id": 2,
          "username": "BDavis (WMF)"
        }
      },
      "created": "2021-07-18T00:23:01.948268Z",
      "updated": "2021-07-18T00:23:01.948294Z",
      "expires": "2021-07-18T10:23:01.946777Z"
    },
    {
      "id": 2,
      "user": {
        "id": 2,
        "username": "BDavis (WMF)"
      },
      "application": {
        "name": "toolhub-gadget-demo",
        "redirect_url": "https://toolhub-gadget-demo.toolforge.org/authorize",
        "client_id": "MHe2EkBAsxSoBCeKfoXUkF1GuEk61l4VtD0xt5Kr",
        "user": {
          "id": 2,
          "username": "BDavis (WMF)"
        }
      },
      "created": "2021-07-18T23:06:51.707298Z",
      "updated": "2021-07-18T23:06:51.707325Z",
      "expires": "2021-07-19T09:06:51.706633Z"
    },
    {
      "id": 3,
      "user": {
        "id": 2,
        "username": "BDavis (WMF)"
      },
      "application": {
        "name": "toolhub-gadget-demo",
        "redirect_url": "https://toolhub-gadget-demo.toolforge.org/authorize",
        "client_id": "MHe2EkBAsxSoBCeKfoXUkF1GuEk61l4VtD0xt5Kr",
        "user": {
          "id": 2,
          "username": "BDavis (WMF)"
        }
      },
      "created": "2021-07-18T23:21:31.905318Z",
      "updated": "2021-07-18T23:21:31.905340Z",
      "expires": "2021-07-19T09:21:31.904706Z"
    },
    {
      "id": 4,
      "user": {
        "id": 2,
        "username": "BDavis (WMF)"
      },
      "application": {
        "name": "toolhub-gadget-demo",
        "redirect_url": "https://toolhub-gadget-demo.toolforge.org/authorize",
        "client_id": "MHe2EkBAsxSoBCeKfoXUkF1GuEk61l4VtD0xt5Kr",
        "user": {
          "id": 2,
          "username": "BDavis (WMF)"
        }
      },
      "created": "2021-07-18T23:34:14.716025Z",
      "updated": "2021-07-18T23:34:14.716059Z",
      "expires": "2021-07-19T09:34:14.715217Z"
    },
    {
      "id": 5,
      "user": {
        "id": 2,
        "username": "BDavis (WMF)"
      },
      "application": {
        "name": "toolhub-gadget-demo",
        "redirect_url": "https://toolhub-gadget-demo.toolforge.org/authorize",
        "client_id": "MHe2EkBAsxSoBCeKfoXUkF1GuEk61l4VtD0xt5Kr",
        "user": {
          "id": 2,
          "username": "BDavis (WMF)"
        }
      },
      "created": "2021-07-18T23:35:45.176873Z",
      "updated": "2021-07-18T23:35:45.176899Z",
      "expires": "2021-07-19T09:35:45.176232Z"
    }
  ]
}

Event Timeline

Change 706628 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/toolhub@main] dev: Add an OAuth client demo application

https://gerrit.wikimedia.org/r/706628

Change 706628 merged by jenkins-bot:

[wikimedia/toolhub@main] dev: Add an OAuth client demo application

https://gerrit.wikimedia.org/r/706628

Change 707870 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/toolhub@main] ui: refactor OAuth views and storage

https://gerrit.wikimedia.org/r/707870

Change 707870 merged by jenkins-bot:

[wikimedia/toolhub@main] ui: refactor OAuth views and storage

https://gerrit.wikimedia.org/r/707870