@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow null for token expiration date

Summary: At least under GitHub, the token value is stored as "null", and not missing. And `null > anything` is false, so Phabricator thinks the token is expired or not there.

Test Plan: http://ph.vm/settings/panel/external/ before shows "No OAuth Access Token," and after it says "Active OAuth Token".

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7466

authored by

Aviv Eyal and committed by
epriestley
2250ee6a 3a39b012

+2 -2
+2 -2
src/applications/auth/provider/PhabricatorAuthProviderOAuth.php
··· 282 282 // Don't return a token with fewer than this many seconds remaining until 283 283 // it expires. 284 284 $shortest_token = 60; 285 - 286 285 if ($access_token) { 287 - if ($access_expires > (time() + $shortest_token)) { 286 + if ($access_expires === null || 287 + $access_expires > (time() + $shortest_token)) { 288 288 return $access_token; 289 289 } 290 290 }