Skip to content

Commit 778d9f7

Browse files
authored
feat: log when scopes missing (#1743)
Signed-off-by: Adam Setch <[email protected]>
1 parent 9b4744f commit 778d9f7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/renderer/utils/auth/utils.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { format } from 'date-fns';
33
import semver from 'semver';
44

55
import { APPLICATION } from '../../../shared/constants';
6-
import { logError } from '../../../shared/logger';
6+
import { logError, logWarn } from '../../../shared/logger';
77
import type {
88
Account,
99
AuthCode,
@@ -179,6 +179,13 @@ export async function refreshAccount(account: Account): Promise<Account> {
179179
account.hasRequiredScopes = Constants.AUTH_SCOPE.every((scope) =>
180180
accountScopes.includes(scope),
181181
);
182+
183+
if (!account.hasRequiredScopes) {
184+
logWarn(
185+
'refreshAccount',
186+
`account for user ${account.user.login} is missing required scopes`,
187+
);
188+
}
182189
} catch (err) {
183190
logError(
184191
'refreshAccount',

0 commit comments

Comments
 (0)