feat(shell-sync): log_oauth_authorization_guidance
This commit is contained in:
1 parent
4785acca8c
commit
6941880b1a
1 file changed
+11
@@ -42,3 +42,14 @@ oauth_authorization_invalid() {
|
||||
'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'
|
||||
}
|
||||
|
||||
log_oauth_authorization_guidance() {
|
||||
local i="$1"
|
||||
local provider="$2"
|
||||
local logfile="$3"
|
||||
|
||||
if oauth_authorization_invalid "$logfile"; then
|
||||
log "Account $i: OAuth2 authorization is expired, revoked, or rejected by $provider. Reauthorize with: docker compose run --rm imapsync authorize $i"
|
||||
log "Account $i: After reauthorization, run immediately with: docker compose exec imapsync sync.sh sync $i"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user