mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
core: token without a scope is invalid
This commit is contained in:
@@ -94,7 +94,7 @@ class TokenManager {
|
|||||||
) {
|
) {
|
||||||
return await getSafeToken(async () => {
|
return await getSafeToken(async () => {
|
||||||
const token = await this.getToken(true, forceRenew);
|
const token = await this.getToken(true, forceRenew);
|
||||||
if (!token) return;
|
if (!token || !token.scope) return;
|
||||||
if (!scopes.some((s) => token.scope.includes(s))) return;
|
if (!scopes.some((s) => token.scope.includes(s))) return;
|
||||||
return token.access_token;
|
return token.access_token;
|
||||||
}, "Error getting access token:");
|
}, "Error getting access token:");
|
||||||
|
|||||||
Reference in New Issue
Block a user