From 9c1eaf3ff723781c6f5290a2061a57f0902d216a Mon Sep 17 00:00:00 2001 From: sugoidogo Date: Sun, 26 Jan 2025 12:51:37 +0000 Subject: [PATCH] a null token has no scopes --- static/SugoiAuthProvider.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/SugoiAuthProvider.mjs b/static/SugoiAuthProvider.mjs index 153441d..2e42326 100644 --- a/static/SugoiAuthProvider.mjs +++ b/static/SugoiAuthProvider.mjs @@ -13,6 +13,9 @@ function getTwurpleProxy(token){ * @param {...string} scopes */ function hasScopes(token,...scopes){ + if(!token){ + return false + } for(const scope of scopes){ if(!token.scope.includes(scope)){ return false