Skip to content

Commit 9ed8a98

Browse files
committed
feat(accounts): warn when missing scopes
Signed-off-by: Adam Setch <[email protected]>
1 parent 7f51d82 commit 9ed8a98

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/renderer/routes/Accounts.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ export const AccountsRoute: FC = () => {
111111
>
112112
<button
113113
type="button"
114-
className="cursor-default"
115-
title={`This account is missing one or more required scopes: \n\t- ${Constants.AUTH_SCOPE.join('\n\t- ')}`}
114+
className="cursor-pointer"
115+
title={`This account is missing one or more required scopes: \n - ${Constants.AUTH_SCOPE.join('\n - ')}`}
116+
onClick={() => openDeveloperSettings(account)}
116117
>
117118
<AlertFillIcon
118119
size={Size.XSMALL}

src/renderer/utils/auth/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export async function refreshAccount(account: Account): Promise<Account> {
172172

173173
const accountScopes = res.headers['x-oauth-scopes']
174174
?.split(',')
175-
.map((scope) => scope.trim());
175+
.map((scope: string) => scope.trim());
176176

177177
account.hasRequiredScopes = Constants.AUTH_SCOPE.every((scope) =>
178178
accountScopes.includes(scope),

0 commit comments

Comments
 (0)