From 1f39b264b3e5228775f91a842da963d82bfb104b Mon Sep 17 00:00:00 2001 From: hoelee Date: Wed, 26 Aug 2026 09:15:00 +0800 Subject: [PATCH] feat(shell-sync): oauth_authorization_invalid --- platform/shell-sync/sync.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/shell-sync/sync.sh b/platform/shell-sync/sync.sh index cab80dda..6d3ab803 100644 --- a/platform/shell-sync/sync.sh +++ b/platform/shell-sync/sync.sh @@ -36,3 +36,9 @@ get_var() { echo "${!varname:-}" } +oauth_authorization_invalid() { + local logfile="$1" + tail -n 200 "$logfile" 2>/dev/null | grep -Eqi \ + 'invalid_grant|expired.*(token|credential)|token.*expired|refresh token.*(expired|revoked|invalid)|authorization.*(expired|revoked)|AADSTS700082|AADSTS700084|AUTHENTICATE failed|authentication.*failed|authentication unsuccessful|invalid credentials' +} +