Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15397984
D21028.id50093.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21028.id50093.diff
View Options
diff --git a/src/applications/auth/adapter/PhutilGoogleAuthAdapter.php b/src/applications/auth/adapter/PhutilGoogleAuthAdapter.php
--- a/src/applications/auth/adapter/PhutilGoogleAuthAdapter.php
+++ b/src/applications/auth/adapter/PhutilGoogleAuthAdapter.php
@@ -13,8 +13,23 @@
return 'google.com';
}
- public function getAccountID() {
- return $this->getAccountEmail();
+ protected function newAccountIdentifiers() {
+ $identifiers = array();
+
+ $account_id = $this->getOAuthAccountData('id');
+ if ($account_id !== null) {
+ $account_id = sprintf(
+ 'id(%s)',
+ $account_id);
+ $identifiers[] = $this->newAccountIdentifier($account_id);
+ }
+
+ $email = $this->getAccountEmail();
+ if ($email !== null) {
+ $identifiers[] = $this->newAccountIdentifier($email);
+ }
+
+ return $identifiers;
}
public function getAccountEmail() {
diff --git a/src/applications/auth/provider/PhabricatorAuthProvider.php b/src/applications/auth/provider/PhabricatorAuthProvider.php
--- a/src/applications/auth/provider/PhabricatorAuthProvider.php
+++ b/src/applications/auth/provider/PhabricatorAuthProvider.php
@@ -204,13 +204,6 @@
get_class($this)));
}
- if (count($identifiers) !== 1) {
- throw new Exception(
- pht(
- 'Unexpected number of account identifiers returned (by class "%s").',
- get_class($this)));
- }
-
$config = $this->getProviderConfig();
$viewer = PhabricatorUser::getOmnipotentUser();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 17, 11:07 PM (5 d, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7225539
Default Alt Text
D21028.id50093.diff (1 KB)
Attached To
Mode
D21028: Read both email addresses and Google Account IDs from Google OAuth
Attached
Detach File
Event Timeline
Log In to Comment