Skip to content

Commit 2d8847e

Browse files
committed
feat: use system browser for oauth flow
Signed-off-by: Adam Setch <[email protected]>
1 parent b2ccf2c commit 2d8847e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/renderer/utils/auth/utils.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ export async function addAccount(
120120
newAccount = await refreshAccount(newAccount);
121121
const newAccountUUID = getAccountUUID(newAccount);
122122

123-
const existingAccount = accountList.find(
123+
const accountAlreadyExists = accountList.some(
124124
(a) => getAccountUUID(a) === newAccountUUID,
125125
);
126126

127-
if (existingAccount) {
127+
if (accountAlreadyExists) {
128128
logWarn(
129129
'addAccount',
130130
`account for user ${newAccount.user.login} already exists`,
@@ -152,8 +152,6 @@ export async function refreshAccount(account: Account): Promise<Account> {
152152
try {
153153
const res = await getAuthenticatedUser(account.hostname, account.token);
154154

155-
// console.log('ADAM RESPONSE', JSON.stringify(res, null, 2));
156-
157155
// Refresh user data
158156
account.user = {
159157
id: res.data.id,

0 commit comments

Comments
 (0)