Skip to content

Commit

Permalink
fix: infer token_type in repair step
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky committed Aug 29, 2024
1 parent db3101c commit 49aaa12
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Migration/MultiAccountRepairStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public function run(IOutput $output) {
$account->setUrl($this->config->getUserUrl($userId));
$account->setToken($this->config->getUserToken($userId));
$account->setTokenType($this->config->getUserTokenType($userId));
if (!$account->getTokenType()) {
if ($this->config->hasUserRefreshToken($userId)) {
$account->setTokenType('oauth');
} else {
$account->setTokenType('personal');
}
}
if ($this->config->hasUserTokenExpiresAt($userId)) {
$account->setTokenExpiresAt($this->config->getUserTokenExpiresAt($userId));
}
Expand Down

0 comments on commit 49aaa12

Please sign in to comment.