Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14360695
D9937.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
D9937.diff
View Options
diff --git a/src/applications/auth/provider/PhabricatorAuthProviderOAuth2.php b/src/applications/auth/provider/PhabricatorAuthProviderOAuth2.php
--- a/src/applications/auth/provider/PhabricatorAuthProviderOAuth2.php
+++ b/src/applications/auth/provider/PhabricatorAuthProviderOAuth2.php
@@ -239,8 +239,17 @@
PHUIObjectItemView $item,
PhabricatorExternalAccount $account) {
- // Get a valid token, possibly refreshing it.
- $oauth_token = $this->getOAuthAccessToken($account);
+ // Get a valid token, possibly refreshing it. If we're unable to refresh
+ // it, render a message to that effect. The user may be able to repair the
+ // link by manually reconnecting.
+
+ $is_invalid = false;
+ try {
+ $oauth_token = $this->getOAuthAccessToken($account);
+ } catch (Exception $ex) {
+ $oauth_token = null;
+ $is_invalid = true;
+ }
$item->addAttribute(pht('OAuth2 Account'));
@@ -256,6 +265,8 @@
pht(
'Active OAuth Token'));
}
+ } else if ($is_invalid) {
+ $item->addAttribute(pht('Invalid OAuth Access Token'));
} else {
$item->addAttribute(pht('No OAuth Access Token'));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 10:34 AM (17 h, 55 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6913642
Default Alt Text
D9937.diff (1 KB)
Attached To
Mode
D9937: Recover from a broken external OAuth2 account
Attached
Detach File
Event Timeline
Log In to Comment