From 2223d6b914678b402e2049bf321492a7ca8e9d59 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 8 Nov 2019 08:46:37 -0800 Subject: [PATCH] Update Asana Auth adapter for "gid" API changes Summary: Ref T13453. The Asana API has changed, replacing all "id" fields with "gid", including the "users/me" API call result. Test Plan: Linked an Asana account. Before: error about missing 'id'. After: clean link. Maniphest Tasks: T13453 Differential Revision: https://secure.phabricator.com/D20899 --- src/applications/auth/adapter/PhutilAsanaAuthAdapter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/auth/adapter/PhutilAsanaAuthAdapter.php b/src/applications/auth/adapter/PhutilAsanaAuthAdapter.php index 5d9a9ec478..5fe343671e 100644 --- a/src/applications/auth/adapter/PhutilAsanaAuthAdapter.php +++ b/src/applications/auth/adapter/PhutilAsanaAuthAdapter.php @@ -14,7 +14,9 @@ final class PhutilAsanaAuthAdapter extends PhutilOAuthAuthAdapter { } public function getAccountID() { - return $this->getOAuthAccountData('id'); + // See T13453. The Asana API has changed to string IDs and now returns a + // "gid" field (previously, it returned an "id" field). + return $this->getOAuthAccountData('gid'); } public function getAccountEmail() { -- 2.51.2